VirtualBox

Ignore:
Timestamp:
Nov 2, 2012 11:39:25 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
81781
Message:

Installer/linux: add post command and a couple of adjustments to headless X.Org script.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/testcase/tstHeadlessXOrg.sh

    r43795 r43796  
    264264expect_exit "${PID}" 5 test_pre_command
    265265rm -f "${XORG_FOLDER}"/xorg.conf.* "${TEST_FOLDER}"/run/pre*
     266
     267# Set up our post-command test configuration file.
     268create_basic_configuration_file "${TEST_FOLDER}/conf" "${TEST_FOLDER}"
     269cat >> "${TEST_FOLDER}/conf" << EOF
     270HEADLESS_X_ORG_SERVER_COMMAND="rm -f \"${TEST_FOLDER}/run/post\""
     271HEADLESS_X_ORG_SERVER_POST_COMMAND="touch \"${TEST_FOLDER}/run/post\""
     272EOF
     273
     274# Post-command test.
     275print_line "post-command test"
     276touch "${XORG_FOLDER}/xorg.conf.2"
     277touch "${XORG_FOLDER}/xorg.conf.4"
     278
     279test_post_command()
     280{
     281  STATUS="$1"
     282  case "${STATUS}" in
     283  0)
     284    LOG_FOLDER="${TEST_FOLDER}/log"
     285    LOG="${LOG_FOLDER}/log"
     286    if [ -e "${TEST_FOLDER}/run/post" ]; then
     287      printf "SUCCESS.\n"
     288    else
     289      printf "\nFAILED: post-command not executed.\n"
     290    fi
     291    ;;
     292  *)
     293    printf "\nFAILED: exit status ${STATUS}.\n"
     294  esac
     295}
     296
     297rm -f "${TEST_FOLDER}/run/post"
     298./VBoxHeadlessXOrg.sh -c "${TEST_FOLDER}/conf" &
     299PID=$!
     300expect_exit "${PID}" 5 test_post_command
     301rm -f "${XORG_FOLDER}"/xorg.conf.* "${TEST_FOLDER}/run/post"
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette