Commit b964b95b authored by Levin Zimmermann's avatar Levin Zimmermann

software/fluentd: Fix SR test on Debian 11

On Debian 10 the test was successful because it could use the system
python (usr/bin/python). In Debian 11 the system python isn't available
anymore, therefore it fails. To ensure the Fluentd program can successfully
execute the "python custom_read_bme280.py" command, the script passes
the same python binary to the Fluentd config file with which the test
is called (sys.executable).
parent ce75e16e
...@@ -35,6 +35,7 @@ import subprocess ...@@ -35,6 +35,7 @@ import subprocess
import tempfile import tempfile
import time import time
import six import six
import sys
from six.moves.SimpleHTTPServer import SimpleHTTPRequestHandler from six.moves.SimpleHTTPServer import SimpleHTTPRequestHandler
from six.moves.socketserver import StreamRequestHandler, TCPServer from six.moves.socketserver import StreamRequestHandler, TCPServer
...@@ -171,7 +172,7 @@ class SensorConfTestCase(WendelinTutorialTestCase): ...@@ -171,7 +172,7 @@ class SensorConfTestCase(WendelinTutorialTestCase):
<source> <source>
@type exec @type exec
tag tag.name tag tag.name
command python %s command %s %s
run_interval %ss run_interval %ss
<parse> <parse>
keys pressure, humidity, temperature keys pressure, humidity, temperature
...@@ -186,7 +187,7 @@ class SensorConfTestCase(WendelinTutorialTestCase): ...@@ -186,7 +187,7 @@ class SensorConfTestCase(WendelinTutorialTestCase):
<buffer> <buffer>
flush_mode immediate flush_mode immediate
</buffer> </buffer>
</match>''' % (script_path, FLUSH_INTERVAL, cls._ipv6_address) </match>''' % (sys.executable, script_path, FLUSH_INTERVAL, cls._ipv6_address)
@classmethod @classmethod
def sensor_script(cls, measurementList): def sensor_script(cls, measurementList):
...@@ -280,4 +281,4 @@ class GatewayConfTestCase(WendelinTutorialTestCase): ...@@ -280,4 +281,4 @@ class GatewayConfTestCase(WendelinTutorialTestCase):
data, data,
msgpack.unpackb( msgpack.unpackb(
self.serve(self._wendelin_port, WendelinHTTPRequestHandler)), self.serve(self._wendelin_port, WendelinHTTPRequestHandler)),
) )
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment