Daily Test: Repeat 20 times

This commit is contained in:
Lup Yuen Lee 2024-09-29 18:40:19 +08:00
parent 0d053ef7ff
commit 33d137d195
6 changed files with 46 additions and 20 deletions

View file

@ -43,12 +43,6 @@ function test_nuttx {
| tee /tmp/release-$BUILD_PREFIX.log \
2>&1
## Trim to first 100000 bytes
head -c 100000 /tmp/release-$BUILD_PREFIX.log \
>/tmp/release2-$BUILD_PREFIX.log
mv /tmp/release2-$BUILD_PREFIX.log \
/tmp/release-$BUILD_PREFIX.log
echo "----- Upload the Test Log"
$SCRIPT_DIR/upload-knsh64.sh \
/tmp/release-$BUILD_PREFIX.tag \

View file

@ -43,12 +43,6 @@ function test_nuttx {
| tee /tmp/release-$BUILD_PREFIX.log \
2>&1
## Trim to first 100000 bytes
head -c 100000 /tmp/release-$BUILD_PREFIX.log \
>/tmp/release2-$BUILD_PREFIX.log
mv /tmp/release2-$BUILD_PREFIX.log \
/tmp/release-$BUILD_PREFIX.log
echo "----- Upload the Test Log"
$SCRIPT_DIR/upload-nsh64.sh \
/tmp/release-$BUILD_PREFIX.tag \

View file

@ -47,6 +47,21 @@ ls -l
ls -l ../apps/bin
cat nuttx.hash
qemu-system-riscv64 --version
date
./$script.exp
date
## Test 20 times
for i in {1..20}
do
echo "===== Attempt $i"
date
set +e ## Ignore error when any command fails
./$script.exp
if [ $? -ne 0 ]
then
echo "===== ERROR AT ATTEMPT $i"
break
fi
set -e ## Exit when any command fails
echo "===== $i Attempts Successful"
date
sleep 10
done

View file

@ -41,6 +41,21 @@ chmod +x $script.exp
ls -l
cat nuttx.hash
qemu-system-riscv64 --version
date
./$script.exp
date
## Test 20 times
for i in {1..20}
do
echo "===== Attempt $i"
date
set +e ## Ignore error when any command fails
./$script.exp
if [ $? -ne 0 ]
then
echo "===== ERROR AT ATTEMPT $i"
break
fi
set -e ## Exit when any command fails
echo "===== $i Attempts Successful"
date
sleep 10
done

View file

@ -65,11 +65,15 @@ cat $log \
>>/tmp/upload-knsh64.log
echo '```' >>/tmp/upload-knsh64.log
## Trim to first 100000 bytes
head -c 100000 /tmp/upload-knsh64.log \
>/tmp/upload-knsh64-trim.log
## Upload the Test Log to the GitHub Release Notes
set -x ## Echo commands
gh release edit \
`cat $tag` \
--notes-file /tmp/upload-knsh64.log \
--notes-file /tmp/upload-knsh64-trim.log \
--repo $repo
set +x ## Don't echo commands

View file

@ -65,11 +65,15 @@ cat $log \
>>/tmp/upload-nsh64.log
echo '```' >>/tmp/upload-nsh64.log
## Trim to first 100000 bytes
head -c 100000 /tmp/upload-nsh64.log \
>/tmp/upload-nsh64-trim.log
## Upload the Test Log to the GitHub Release Notes
set -x ## Echo commands
gh release edit \
`cat $tag` \
--notes-file /tmp/upload-nsh64.log \
--notes-file /tmp/upload-nsh64-trim.log \
--repo $repo
set +x ## Don't echo commands