Pārlūkot izejas kodu

Create parallel test runner script

master
haskal pirms 7 mēnešiem
vecāks
revīzija
f8d0547601
2 mainītis faili ar 17 papildinājumiem un 1 dzēšanām
  1. +16
    -0
      scripts/ci.sh
  2. +1
    -1
      scripts/run-tests.sh

+ 16
- 0
scripts/ci.sh Parādīt failu

@@ -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

+ 1
- 1
scripts/run-tests.sh Parādīt failu

@@ -4,4 +4,4 @@ rm /etc/resolv.conf
echo "nameserver 8.8.8.8" > /etc/resolv.conf
cd $1
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

Notiek ielāde…
Atcelt
Saglabāt