diff --git a/hw/production_test/.gitignore b/hw/production_test/.gitignore index 5ceb386..5aa5059 100644 --- a/hw/production_test/.gitignore +++ b/hw/production_test/.gitignore @@ -1 +1,2 @@ venv +wipedonce diff --git a/hw/production_test/production_test.py b/hw/production_test/production_test.py index a25ed42..d6f540c 100755 --- a/hw/production_test/production_test.py +++ b/hw/production_test/production_test.py @@ -417,7 +417,7 @@ def run_tests(test_list): return True if __name__ == '__main__': - last_a = 0 + last_a = 1 # Allow any of the settings in the file_locations structure to be overridden import argparse @@ -454,13 +454,9 @@ if __name__ == '__main__': options.append([test]) i += 1 - - if(int(last_a) == 0): - a = input('\n\n\nPlease type an option number and press return:') - else: - a = input('\n\n\nPress return to re-run test {:}, or type in a new option number and press return:'.format(last_a)) - if a == '': - a = last_a + a = input('\n\n\nPress return to run test {:}, or type in a new option number and press return:'.format(last_a)) + if a == '': + a = last_a try: test_sequence = options[int(a)-1] diff --git a/hw/production_test/run b/hw/production_test/run new file mode 100755 index 0000000..c7aa603 --- /dev/null +++ b/hw/production_test/run @@ -0,0 +1,22 @@ +#!/bin/sh +set -eu + +if [ -e /etc/debian_version ]; then + dpkg -s python3-venv || sudo apt install python3-venv +fi + +# their current venv might have gone funky... +if [ -e venv ] && [ ! -e wipedonce ]; then + rm -rf venv + touch wipedonce +fi + +if [ ! -e venv ]; then + python3 -m venv venv + . ./venv/bin/activate + pip3 install -r requirements.txt +else + . ./venv/bin/activate +fi + +./production_test.py