Create parallel test runner script
This commit is contained in:
parent
ba5d516f4e
commit
f8d0547601
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd build
|
||||||
|
echo Running tests with $(nproc) threads...
|
||||||
|
ls tests | parallel "mkdir {}.d; cd {}.d; ../sim --router ../../router ../tests/{} &> test.log" &>/dev/null
|
||||||
|
echo Complete
|
||||||
|
for x in $(ls tests); do
|
||||||
|
if cat $x.d/*.log | grep PASS &>/dev/null; then
|
||||||
|
tput setaf 2
|
||||||
|
echo $x pass
|
||||||
|
else
|
||||||
|
tput setaf 1
|
||||||
|
echo $x fail
|
||||||
|
fi
|
||||||
|
tput sgr0
|
||||||
|
done
|
|
@ -4,4 +4,4 @@ rm /etc/resolv.conf
|
||||||
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||||
cd $1
|
cd $1
|
||||||
export LD_LIBRARY_PATH=/usr/local/lib
|
export LD_LIBRARY_PATH=/usr/local/lib
|
||||||
/usr/local/bin/python3.6 sim --router ../router milestone
|
/usr/local/bin/python3.6 sim --router ../router all
|
||||||
|
|
Loading…
Reference in New Issue