Finished adding timed execution tests

This commit is contained in:
deajan 2016-11-29 22:40:10 +01:00
parent 3371e9a8f3
commit e15587524b
1 changed files with 21 additions and 22 deletions

View File

@ -7,9 +7,7 @@
## On CYGWIN / MSYS, ACL and extended attributes aren't supported
# osync test suite 2016112401
# TODO: timed execution test with soft & hard max time checks
# osync test suite 2016112901
# 4 tests:
# quicklocal
@ -27,6 +25,7 @@
# replica lock checks
# file attribute tests
# local / remote locking resume tests
# timed execution tests
# function test
# WaitForTaskCompletion
@ -266,7 +265,7 @@ function test_Merge () {
SetConfFileValue "$OSYNC_DIR/$OSYNC_EXECUTABLE" "IS_STABLE" "yes"
}
function nope_test_LargeFileSet () {
function test_LargeFileSet () {
for i in "${osyncParameters[@]}"; do
cd "$OSYNC_DIR"
@ -284,7 +283,7 @@ function nope_test_LargeFileSet () {
done
}
function nope_test_Exclusions () {
function test_Exclusions () {
# Will sync except php files
# RSYNC_EXCLUDE_PATTERN="*.php" is set at runtime for quicksync and in config files for other runs
@ -312,7 +311,7 @@ function nope_test_Exclusions () {
done
}
function nope_test_Deletetion () {
function test_Deletetion () {
local iFile1="$INITIATOR_DIR/ific"
local iFile2="$INITIATOR_DIR/ifoc"
local tFile1="$TARGET_DIR/tfic"
@ -356,7 +355,7 @@ function nope_test_Deletetion () {
done
}
function nope_test_deletion_failure () {
function test_deletion_failure () {
if [ "$LOCAL_OS" == "WinNT10" ]; then
echo "Skipping deletion failure test as Win10 does not have chattr support."
return 0
@ -422,7 +421,7 @@ function nope_test_deletion_failure () {
done
}
function nope_test_skip_deletion () {
function test_skip_deletion () {
local modes
if [ "$OSYNC_MIN_VERSION" == "1" ]; then
@ -493,7 +492,7 @@ function nope_test_skip_deletion () {
SetConfFileValue "$CONF_DIR/$REMOTE_CONF" "SKIP_DELETION" ""
}
function nope_test_softdeletion_cleanup () {
function test_softdeletion_cleanup () {
#declare -A files
files=()
@ -549,7 +548,7 @@ function nope_test_softdeletion_cleanup () {
}
function nope_test_FileAttributePropagation () {
function test_FileAttributePropagation () {
if [ "$TRAVIS_RUN" == true ]; then
echo "Skipping FileAttributePropagation tests as travis does not support getfacl / setfacl."
@ -627,7 +626,7 @@ function nope_test_FileAttributePropagation () {
done
}
function nope_test_ConflictBackups () {
function test_ConflictBackups () {
for i in "${osyncParameters[@]}"; do
cd "$OSYNC_DIR"
PrepareLocalDirs
@ -663,7 +662,7 @@ function nope_test_ConflictBackups () {
done
}
function nope_test_MultipleConflictBackups () {
function test_MultipleConflictBackups () {
local additionalParameters
@ -723,7 +722,7 @@ function nope_test_MultipleConflictBackups () {
SetConfFileValue "$CONF_DIR/$REMOTE_CONF" "CONFLICT_BACKUP_MULTIPLE" "no"
}
function nope_test_Locking () {
function test_Locking () {
local forceStrangerUnlockLocal
local forceStrangerUnlockRemote
@ -832,7 +831,7 @@ function nope_test_Locking () {
SetConfFileValue "$CONF_DIR/$REMOTE_CONF" "FORCE_STRANGER_LOCK_RESUME" "$forceStrangerUnlockRemote"
}
function nope_test_WaitForTaskCompletion () {
function test_WaitForTaskCompletion () {
if [ "$OSYNC_MIN_VERSION" == "1" ]; then
echo "Skipping WaitForTaskCompletion test because osync v1.1 does not support multiple pid monitoring"
return 0
@ -887,7 +886,7 @@ function nope_test_WaitForTaskCompletion () {
assertEquals "WaitForTaskCompletion test 5" "2" $?
}
function nope_test_ParallelExec () {
function test_ParallelExec () {
if [ "$OSYNC_MIN_VERSION" == "1" ]; then
echo "Skipping ParallelExec test because osync v1.1 ofunctions don't have this function."
return 0
@ -952,9 +951,9 @@ function nope_test_ParallelExec () {
function test_timedExecution () {
local arguments
if [ "$OSYNC_MIN_VERSION" -gt "1" ]; then
arguments="--errors-only"
fi
#if [ "$OSYNC_MIN_VERSION" -gt "1" ]; then
# arguments="--errors-only"
#fi
# Clever usage of indexes and exit codes
# osync exits with 0 when no problem detected
@ -982,13 +981,13 @@ function test_timedExecution () {
PrepareLocalDirs
echo "Test with args [$i $arguments]."
SOFT_MAX_EXEC_TIME=${softTimes[$x]} HARD_MAX_EXEC_TIME=${hardTimes[$x]} ./$OSYNC_EXECUTABLE $i $arguments
SLEEP_TIME=1 SOFT_MAX_EXEC_TIME=${softTimes[$x]} HARD_MAX_EXEC_TIME=${hardTimes[$x]} ./$OSYNC_EXECUTABLE $i $arguments
assertEquals "Timed Execution test with timed SOFT_MAX_EXEC_TIME=${softTimes[$x]} and HARD_MAX_EXEC_TIME=${hardTimes[$x]}." $x $?
done
done
}
function nope_test_UpgradeConfRun () {
function test_UpgradeConfRun () {
if [ "$OSYNC_MIN_VERSION" == "1" ]; then
echo "Skipping Upgrade script test because no further dev will happen on this for v1.1"
return 0
@ -1010,7 +1009,7 @@ function nope_test_UpgradeConfRun () {
rm -f "$CONF_DIR/$TMP_OLD_CONF.save"
}
function nope_test_DaemonMode () {
function test_DaemonMode () {
if [ "$LOCAL_OS" == "WinNT10" ] || [ "$LOCAL_OS" == "msys" ]; then
echo "Skipping daemon mode test as Win10 does not have inotifywait support."
return 0
@ -1065,7 +1064,7 @@ function nope_test_DaemonMode () {
}
function nope_test_NoRemoteAccessTest () {
function test_NoRemoteAccessTest () {
RemoveSSH
cd "$OSYNC_DIR"