From c47eb22f5cc828db58379638c8ae484d5af720bf Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Fri, 1 Mar 2019 19:49:32 -0500 Subject: [PATCH] Run tests using the binary distribution --- .travis.yml | 5 +++++ test/test_device.py | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index 5ad87d182..dda6b884a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,3 +55,8 @@ jobs: script: cd test; poetry run ./run_tests.py --interface=library - name: With command line interface script: cd test; poetry run ./run_tests.py --interface=cli + - name: With binary distribution command line interface + python: '3.6.8' + script: + - contrib/build_bin.sh + - cd test; poetry run ./run_tests.py --interface=cli diff --git a/test/test_device.py b/test/test_device.py index 3f8b9bc67..8739a9738 100644 --- a/test/test_device.py +++ b/test/test_device.py @@ -83,6 +83,10 @@ def do_command(self, args): proc = subprocess.Popen(['hwi ' + ' '.join(args)], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, shell=True) result = proc.communicate() return json.loads(result[0].decode()) + elif self.interface == 'bindist': + proc = subprocess.Popen(['dist/hwi ' + ' '.join(args)], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, shell=True) + result = proc.communicate() + return json.loads(result[0].decode()) else: return process_commands(args)