Run tests w/Python 2, or 3, or both, depending on what's available.
Chris Pressey
3 years ago
0 | 0 |
#!/bin/sh
|
1 | 1 |
|
2 | |
APPLIANCES="tests/appliances/nhohnhehr.py.md"
|
|
2 |
APPLIANCES=""
|
|
3 |
if command -v python2 > /dev/null 2>&1; then
|
|
4 |
APPLIANCES="$APPLIANCES tests/appliances/nhohnhehr.py2.md"
|
|
5 |
fi
|
|
6 |
if command -v python3 > /dev/null 2>&1; then
|
|
7 |
APPLIANCES="$APPLIANCES tests/appliances/nhohnhehr.py3.md"
|
|
8 |
fi
|
|
9 |
|
|
10 |
if [ "x$APPLIANCES" = "x" ]; then
|
|
11 |
echo "No suitable Python versions found."
|
|
12 |
exit 1
|
|
13 |
fi
|
|
14 |
|
3 | 15 |
falderal $APPLIANCES tests/Nhohnhehr.md || exit 1
|
tests/appliances/nhohnhehr.py.md
less
more
0 | |
-> Functionality "Run Nhohnhehr program, outputting at most 80 bits" is implemented by
|
1 | |
-> shell command
|
2 | |
-> "python2 src/nhohnhehr.py bits %(test-body-file) <%(test-input-file) 2>&1 | head -c 80"
|
3 | |
|
4 | |
-> Functionality "Run Nhohnhehr program, outputting at most 80 bits" is implemented by
|
5 | |
-> shell command
|
6 | |
-> "python3 src/nhohnhehr.py bits %(test-body-file) <%(test-input-file) 2>&1 | head -c 80"
|
|
0 |
-> Functionality "Run Nhohnhehr program, outputting at most 80 bits" is implemented by
|
|
1 |
-> shell command
|
|
2 |
-> "python2 src/nhohnhehr.py bits %(test-body-file) <%(test-input-file) 2>&1 | head -c 80"
|
|
0 |
-> Functionality "Run Nhohnhehr program, outputting at most 80 bits" is implemented by
|
|
1 |
-> shell command
|
|
2 |
-> "python3 src/nhohnhehr.py bits %(test-body-file) <%(test-input-file) 2>&1 | head -c 80"
|