Skip to content
Snippets Groups Projects
Commit 64c4e81d authored by lche0021's avatar lche0021
Browse files

fix bug in smoke_test and generate_bin_test script

parent dade958f
No related branches found
No related tags found
3 merge requests!464Fix listdeps,!442Smoke test,!351Smoke test
Showing
with 74 additions and 45 deletions
......@@ -14,14 +14,14 @@ ver=${1:-"default"}
bin_dirs=$(module show $name/$ver 2>&1 | sed -n "s/.* PATH \(.*\)/\1/p")
NAME_EXEC_EXIST=false
for bin in $bin_dirs; do
for i in $(ls -X $bin); do
if [[ $i == $name ]]; then NAME_EXEC_EXIST=true;fi
for i in $(find $bin -maxdepth 1 -executable -type f ); do
if [[ $(basename $i) == $name ]]; then
$i --version;
exit $?
fi
done
done
if $NAME_EXEC_EXIST; then
$name --version
fi
' > $TESTCASE_DIR/bintest
IFS_orig=$IFS
......
anaconda Command line client (version 1.6.9)
gcc (GCC) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
gcc (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
gcc (GCC) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Unrecognized option: --version
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
libjpeg-turbo 1.4.2 return non-zero exitcode 1 for testcase ./tests/libjpeg-turbo/bashcmd
virtualgl 2.5.0 return non-zero exitcode 1 for testcase ./tests/virtualgl/bashcmd
tigervnc 1.8.0 return non-zero exitcode 1 for testcase ./tests/tigervnc/bashcmd
java 1.8.0_77 return non-zero exitcode 1 for testcase ./tests/java/bintest
openblas 0.2.20 return non-zero exitcode 127 for testcase ./tests/openblas/bashcmd
Summary
Failed: 5
Success 13
No tests found: 0
Failing because not enough tests succeeded
......@@ -5,10 +5,10 @@ OUTPUT_DIR=${1:-output_dir}
# select top 50 most used module by default
NUM_MODULE=${2:-50}
NUM_MODULE=${2:-10}
declare -i TIMELIMIT
BINTEST=false
BINTEST=true
TIMELIMIT=10
TESTCASE_DIR='./tests'
REPORT=$OUTPUT_DIR/'report.txt'
......@@ -42,9 +42,8 @@ for i in $(head -n $NUM_MODULE $USAGE_REPORT); do
echo "No testcase for $m found" | tee -a $REPORT
num_notest+=1
else
ALL_EXEC=$(ls -X $TESTCASE_DIR/$name)
for i in ${ALL_EXEC}; do
t_case=$TESTCASE_DIR/$name/$i
ALL_EXEC=$(find $TESTCASE_DIR/$name -maxdepth 1 -executable -type f)
for t_case in ${ALL_EXEC}; do
if [ $i == 'bintest' ] && ! $BINTEST;then break;fi
timeout $TIMELIMIT $t_case $ver &> $OUTPUT_DIR/$name/$ver
exitcode=$?
......
......@@ -4,12 +4,12 @@ ver=${1:-"default"}
bin_dirs=$(module show $name/$ver 2>&1 | sed -n "s/.* PATH \(.*\)/\1/p")
NAME_EXEC_EXIST=false
for bin in $bin_dirs; do
for i in $(ls -X $bin); do
if [[ $i == $name ]]; then NAME_EXEC_EXIST=true;fi
for i in $(find $bin -maxdepth 1 -executable -type f ); do
if [[ $(basename $i) == $name ]]; then
$i --version;
exit $?
fi
done
done
if $NAME_EXEC_EXIST; then
$name --version
fi
......@@ -4,12 +4,12 @@ ver=${1:-"default"}
bin_dirs=$(module show $name/$ver 2>&1 | sed -n "s/.* PATH \(.*\)/\1/p")
NAME_EXEC_EXIST=false
for bin in $bin_dirs; do
for i in $(ls -X $bin); do
if [[ $i == $name ]]; then NAME_EXEC_EXIST=true;fi
for i in $(find $bin -maxdepth 1 -executable -type f ); do
if [[ $(basename $i) == $name ]]; then
$i --version;
exit $?
fi
done
done
if $NAME_EXEC_EXIST; then
$name --version
fi
......@@ -4,12 +4,12 @@ ver=${1:-"default"}
bin_dirs=$(module show $name/$ver 2>&1 | sed -n "s/.* PATH \(.*\)/\1/p")
NAME_EXEC_EXIST=false
for bin in $bin_dirs; do
for i in $(ls -X $bin); do
if [[ $i == $name ]]; then NAME_EXEC_EXIST=true;fi
for i in $(find $bin -maxdepth 1 -executable -type f ); do
if [[ $(basename $i) == $name ]]; then
$i --version;
exit $?
fi
done
done
if $NAME_EXEC_EXIST; then
$name --version
fi
......@@ -4,12 +4,12 @@ ver=${1:-"default"}
bin_dirs=$(module show $name/$ver 2>&1 | sed -n "s/.* PATH \(.*\)/\1/p")
NAME_EXEC_EXIST=false
for bin in $bin_dirs; do
for i in $(ls -X $bin); do
if [[ $i == $name ]]; then NAME_EXEC_EXIST=true;fi
for i in $(find $bin -maxdepth 1 -executable -type f ); do
if [[ $(basename $i) == $name ]]; then
$i --version;
exit $?
fi
done
done
if $NAME_EXEC_EXIST; then
$name --version
fi
......@@ -4,12 +4,12 @@ ver=${1:-"default"}
bin_dirs=$(module show $name/$ver 2>&1 | sed -n "s/.* PATH \(.*\)/\1/p")
NAME_EXEC_EXIST=false
for bin in $bin_dirs; do
for i in $(ls -X $bin); do
if [[ $i == $name ]]; then NAME_EXEC_EXIST=true;fi
for i in $(find $bin -maxdepth 1 -executable -type f ); do
if [[ $(basename $i) == $name ]]; then
$i --version;
exit $?
fi
done
done
if $NAME_EXEC_EXIST; then
$name --version
fi
......@@ -4,12 +4,12 @@ ver=${1:-"default"}
bin_dirs=$(module show $name/$ver 2>&1 | sed -n "s/.* PATH \(.*\)/\1/p")
NAME_EXEC_EXIST=false
for bin in $bin_dirs; do
for i in $(ls -X $bin); do
if [[ $i == $name ]]; then NAME_EXEC_EXIST=true;fi
for i in $(find $bin -maxdepth 1 -executable -type f ); do
if [[ $(basename $i) == $name ]]; then
$i --version;
exit $?
fi
done
done
if $NAME_EXEC_EXIST; then
$name --version
fi
......@@ -4,12 +4,12 @@ ver=${1:-"default"}
bin_dirs=$(module show $name/$ver 2>&1 | sed -n "s/.* PATH \(.*\)/\1/p")
NAME_EXEC_EXIST=false
for bin in $bin_dirs; do
for i in $(ls -X $bin); do
if [[ $i == $name ]]; then NAME_EXEC_EXIST=true;fi
for i in $(find $bin -maxdepth 1 -executable -type f ); do
if [[ $(basename $i) == $name ]]; then
$i --version;
exit $?
fi
done
done
if $NAME_EXEC_EXIST; then
$name --version
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment