From 1108d2be34a5c5650f184fd602efb4d71e2bac04 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Mon, 28 Dec 2020 12:27:37 +0000 Subject: [PATCH] Small tweaks --- go.sh | 9 +++++---- init/0000-armbian-first-login.bash | 2 ++ lib/functions.sh | 1 + tests/9000-nigtly-stable-switch.bash | 2 +- ...ot-upgrade.bash.disabled => 9003-u-boot-upgrade.bash} | 0 tests/9999-reboot.bash | 4 ++-- 6 files changed, 11 insertions(+), 7 deletions(-) rename tests/{9003-u-boot-upgrade.bash.disabled => 9003-u-boot-upgrade.bash} (100%) diff --git a/go.sh b/go.sh index e1ffa94..b5d16d4 100755 --- a/go.sh +++ b/go.sh @@ -215,7 +215,8 @@ for USER_HOST in "${hostarray[@]}"; do # switch to stable build, current branch from repository if not already there #if [[ -n "$BOARD_IMAGE_TYPE" && "$BOARD_IMAGE_TYPE" != stable && $BOARD_BRANCH != current && $FRESH == yes ]]; then - if [[ -n "$BOARD_IMAGE_TYPE" && $FRESH == yes ]]; then + + if [[ -n "$BOARD_IMAGE_TYPE" && $FRESH == "stable" ]]; then display_alert "Switch to stable builds" "$(date +%R:%S)" "wrn" remote_exec "apt update; apt -y -qq install armbian-config; \ LANG=C armbian-config main=System selection=Stable branch=$BOARD_BRANCH" "-t" &>/dev/null @@ -229,7 +230,7 @@ done # show diff to previous build display_alert "Diff to previous build" "added or removed" "info" cat ${SRC}/reports/data.out | cut -d$'"' -f 4 | sed 's/.*/"&"/' | sort | uniq | awk -F"\"" '{print $2}' > ${SRC}/reports/data.out.txt -cat ${SRC}/reports/data.in ${SRC}/reports/data.out | cut -d$'"' -f 4 | sed 's/.*/"&"/' | sort | uniq | awk -F"\"" '{print $2}' | diff ${SRC}/reports/data.out.txt - | grep ">" +[[ -f ${SRC}/reports/data.in ]] && cat ${SRC}/reports/data.in ${SRC}/reports/data.out | cut -d$'"' -f 4 | sed 's/.*/"&"/' | sort | uniq | awk -F"\"" '{print $2}' | diff ${SRC}/reports/data.out.txt - | grep ">" #cp ${SRC}/reports/data.out ${SRC}/reports/data.in @@ -292,8 +293,8 @@ echo "This whole procedure took "$((($(date +%s) - $START)/60))" minutes". if [[ -n $UPLOAD_SERVER && -n $UPLOAD_LOCATION ]]; then # upload report - rsync -arP --delete ${SRC}/reports/${REPORT}.html -e 'ssh -p 22' ${UPLOAD_SERVER}:${UPLOAD_LOCATION}"autotest.html" + rsync -arP --delete ${SRC}/reports/${REPORT}.html -e 'ssh -p 22' ${UPLOAD_SERVER}:${UPLOAD_LOCATION}"${REPORT}.html" # set link to latest - #ssh ${UPLOAD_SERVER} "cd ${UPLOAD_LOCATION} ; ln -sf ${REPORT}.html latest.html" + ssh ${UPLOAD_SERVER} "cd ${UPLOAD_LOCATION} ; ln -sf ${REPORT}.html latest.html" fi diff --git a/init/0000-armbian-first-login.bash b/init/0000-armbian-first-login.bash index 28d4fd6..27f7141 100755 --- a/init/0000-armbian-first-login.bash +++ b/init/0000-armbian-first-login.bash @@ -23,6 +23,8 @@ MAKE_USER=$(expect -c " send \"${PASS_ROOT}\r\" expect \"Repeat password: \" send \"${PASS_ROOT}\r\" + expect \"Choose default system command shell: \" + send \"2\r\" expect \"*your forename): \" send \"${USER_NORMAL}\r\" expect \"Create password:\" diff --git a/lib/functions.sh b/lib/functions.sh index 07ca93f..887ad1f 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -228,6 +228,7 @@ while [ $r -le ${PASSES} ] for u in "${array[@]}" do unset TEST_OUTPUT + get_board_data DATA_ALIGN="center" . $u [[ $TEST_SKIP != "true" ]] && BODY_HTML+="\t$TEST_OUTPUT" diff --git a/tests/9000-nigtly-stable-switch.bash b/tests/9000-nigtly-stable-switch.bash index c2cee42..80988ce 100755 --- a/tests/9000-nigtly-stable-switch.bash +++ b/tests/9000-nigtly-stable-switch.bash @@ -14,7 +14,7 @@ case "$r" in display_alert "Switch to nightly builds, branch current" "................................." "info" remote_exec "armbian-config main=System selection=Nightly branch=current" "-t" "10m" &>/dev/null ;; -22222) +2) display_alert "Switch to nightly builds, branch dev" "................................." "info" remote_exec "armbian-config main=System selection=Nightly branch=dev" "-t" "10m" &>/dev/null ;; diff --git a/tests/9003-u-boot-upgrade.bash.disabled b/tests/9003-u-boot-upgrade.bash similarity index 100% rename from tests/9003-u-boot-upgrade.bash.disabled rename to tests/9003-u-boot-upgrade.bash diff --git a/tests/9999-reboot.bash b/tests/9999-reboot.bash index fa9c14d..1de691b 100755 --- a/tests/9999-reboot.bash +++ b/tests/9999-reboot.bash @@ -8,5 +8,5 @@ TEST_SKIP="true" display_alert "$(basename $BASH_SOURCE)" "$(date +%R:%S)" "info" display_alert "Rebooting in 3 seconds" "${BOARD_NAME}" "info" sleep 3 -remote_exec "reboot" &>/dev/null -sleep 20 +remote_exec "reboot" +sleep 10