mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-05 10:04:48 +00:00
79 lines
1.8 KiB
Plaintext
79 lines
1.8 KiB
Plaintext
NEW
|
||
PREFIX
|
||
AUTO 4,1
|
||
#!/BIN/SH
|
||
#
|
||
# This is the master script that calls all test scripts.
|
||
# It keeps a count of passed/failed tests and writes results
|
||
# to a log file.
|
||
#
|
||
# First Clear the Screen
|
||
echo -N \f
|
||
#
|
||
echo "\n\n Build Test Script\n\n
|
||
#
|
||
# Now get the build Number
|
||
#
|
||
READ -P " Enter Build Number: " B
|
||
echo "\n\n Running All Tests for Build: $B"
|
||
#
|
||
# Check to see if VAR then VAR/LOG exits, if not create
|
||
#
|
||
IF [ -D ${ROOT}VAR ]
|
||
ELSE
|
||
MD ${ROOT}VAR
|
||
FI
|
||
IF [ -D ${ROOT}VAR/LOG ]
|
||
ELSE
|
||
MD ${ROOT}VAR/LOG
|
||
FI
|
||
IF [ -D ${ROOT}VAR/LOG/TESTS ]
|
||
ELSE
|
||
MD ${ROOT}VAR/LOG/TESTS
|
||
FI
|
||
# Create Log File for tests VAR/LOG/TESTS/BUILD.BuildNo
|
||
#
|
||
# Write Header To Log
|
||
#
|
||
SET Log = "${ROOT}VAR/LOG/TESTS/BUILD.${B}"
|
||
ECHO " Build Test Suite" > ${Log}
|
||
ECHO "\nBuild No: $B" >> ${Log}
|
||
ECHO -N " Date: " >> ${Log}
|
||
DATE >> ${Log}
|
||
ECHO -N " Time: " >> ${Log}
|
||
TIME >> ${Log}
|
||
ECHO "----------------------------------------\n\n" >> ${Log}
|
||
#
|
||
# Capture Mem to Log
|
||
#
|
||
MEM >> ${Log}
|
||
ECHO "----------------------------------------\n\n" >> ${Log}
|
||
#
|
||
# First Create and Set the Test Counters
|
||
#
|
||
SET T = 1
|
||
SET P = 0
|
||
SET F = 0
|
||
#
|
||
# Run The Tests using the current shell (. test)
|
||
#
|
||
. BADSHTEST
|
||
. ECHOTEST
|
||
. ARGTEST
|
||
#
|
||
# End of Tests
|
||
#
|
||
echo "----------------------------------------"
|
||
echo " Total Tests: ${T}"
|
||
echo " Tests Passed: ${P}"
|
||
echo " Tests Failed: ${F}"
|
||
echo "----------------------------------------\n"
|
||
#echo
|
||
echo "----------------------------------------" >> ${Log}
|
||
echo " Total Tests: ${T}" >> ${Log}
|
||
echo " Tests Passed: ${P}" >> ${Log}
|
||
echo " Tests Failed: ${F}" >> ${Log}
|
||
echo "----------------------------------------" >> ${Log}
|
||
MAN
|
||
TEXT /MAKE/USR/SHARE/TESTS/BUILDTEST
|