Start of migration of deprecated profile options

This commit is contained in:
Michael Boelen 2016-07-05 19:56:13 +02:00
parent b44acc16e0
commit 467c30b16b
1 changed files with 22 additions and 7 deletions

View File

@ -243,12 +243,6 @@
SKIP_TESTS="${SKIP_TESTS} ${STRING}"
;;
# Tests to always skip (useful for false positives or problematic tests)
test_skip_always)
TEST_SKIP_ALWAYS="${VALUE}"
LogText "Tests to be skipped: ${VALUE}"
;;
# Do not check the latest version on the internet
skip_upgrade_test | skip-upgrade-test)
FIND=`echo "${VALUE}" | egrep "^(1|true|yes)"` && SKIP_UPGRADE_TEST=1
@ -261,6 +255,7 @@
if [ "${VALUE}" = "light" ]; then SCAN_TEST_LIGHT="YES"; SCAN_TEST_MEDIUM="NO"; SCAN_TEST_HEAVY="NO"; fi
if [ "${VALUE}" = "normal" ]; then SCAN_TEST_LIGHT="YES"; SCAN_TEST_MEDIUM="YES"; SCAN_TEST_HEAVY="NO"; fi
if [ "${VALUE}" = "full" ]; then SCAN_TEST_LIGHT="YES"; SCAN_TEST_MEDIUM="YES"; SCAN_TEST_HEAVY="YES"; fi
AddSetting "test-scan-mode" "${VALUE}" "Scan mode"
;;
# Server IP or hostname
@ -326,7 +321,7 @@
;;
# Receiving system (IP address or hostname)
upload_server | upload-server)
upload-server)
UPLOAD_SERVER="${VALUE}"
AddSetting "upload-server" "${UPLOAD_SERVER}" "Upload server (ip or hostname)"
;;
@ -350,6 +345,26 @@
AddSetting "verbose" "${VERBOSE}" "Verbose output"
;;
########################################################################################################
## DEPRECATED ITEMS
########################################################################################################
# Deprecated: skip tests
test_skip_always)
STRING=`echo ${VALUE} | tr '[:upper:]' '[:lower:]'`
SKIP_TESTS="${SKIP_TESTS} ${STRING}"
LogText "[deprecated option] Tests to be skipped: ${VALUE}"
DisplayToolTip "Replace deprecated option 'test_skip_always' and replace with 'skip-test' (add to custom.prf)"
;;
# Deprecated: receiving system (IP address or hostname)
upload_server)
UPLOAD_SERVER="${VALUE}"
AddSetting "upload-server" "${UPLOAD_SERVER}" "Upload server (ip or hostname)"
DisplayToolTip "Replace deprecated option 'upload_server' and replace with 'upload-server' (add to custom.prf)"
;;
# Catch all bad options and bail out
*)
LogText "Unknown option ${OPTION} (with value: ${VALUE})"