瀏覽代碼

Create parallel test runner script

master
haskal 7 月之前
父節點
當前提交
f8d0547601
共有 2 個文件被更改,包括 17 次插入1 次删除
  1. +16
    -0
      scripts/ci.sh
  2. +1
    -1
      scripts/run-tests.sh

+ 16
- 0
scripts/ci.sh 查看文件

@@ -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 查看文件

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

Loading…
取消
儲存