$ ./tools/tox-venv citest python3 -m tests.cloud_tests run --platform=nocloud-kvm --os-name=xenial --preserve-data --data-dir=results.nocloud-kvm.d --verbose --test=tests/cloud_tests/testcases/modules/final_message.py
2017-11-03 19:48:00,963 - tests.cloud_tests - DEBUG - running with args: Namespace(data_dir='/tmp/cloud-init/results.nocloud-kvm.d', deb=None, feature_override={}, os_name=['xenial'], platform=['nocloud-kvm'], ppa=None, preserve_data=True, quiet=False, repo=None, result=None, rpm=None, script=None, subcmd='run', test_config=['tests/cloud_tests/testcases/modules/final_message.py'], upgrade=False, upgrade_full=False, verbose=True)
2017-11-03 19:48:00,963 - tests.cloud_tests - DEBUG - using tmpdir: /tmp/cloud-init/results.nocloud-kvm.d
2017-11-03 19:48:00,969 - tests.cloud_tests - DEBUG - platform config: {'enabled': True, 'get_image_timeout': 300, 'create_instance_timeout': 60, 'private_key': 'id_rsa', 'public_key': 'id_rsa.pub', 'data_dir': '/tmp/cloud-init/results.nocloud-kvm.d'}
2017-11-03 19:48:00,969 - tests.cloud_tests - INFO - setting up platform: nocloud-kvm
2017-11-03 19:48:00,991 - tests.cloud_tests - DEBUG - os config: {'enabled': True, 'boot_timeout': 120, 'boot_clean_script': '#!/bin/bash\nrm -rf /var/log/cloud-init.log /var/log/cloud-init-output.log \\\n /var/lib/cloud/ /run/cloud-init/ /var/log/syslog\n', 'system_ready_script': "# permit running or degraded state as both indicate complete boot\n[ $(systemctl is-system-running) = 'running' -o\n $(systemctl is-system-running) = 'degraded' ]\n", 'cloud_init_ready_script': "[ -f '/run/cloud-init/result.json' ]\n", 'feature_groups': ['base', 'debian_base', 'ubuntu_specific'], 'features': {'apt': True, 'byobu': True, 'landscape': True, 'lxd': True, 'ppa': True, 'rpm': None, 'snap': True, 'hostname': True, 'apt_src_cont': True, 'apt_hist_fmt': True, 'daylight_time': True, 'apt_up_out': True, 'engb_locale': True, 'locale_gen': True, 'no_ntpdate': True, 'no_file_fmt_e': True, 'ppa_file_name': True, 'sshd': True, 'ssh_key_fmt': True, 'syslog': True, 'ubuntu_ntp': True, 'ubuntu_repos': True, 'ubuntu_user': True, 'lsb_release': True, 'sudo': True}, 'mirror_url': 'https://cloud-images.ubuntu.com/daily', 'mirror_dir': '/srv/citest/nocloud-kvm', 'keyring': '/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg', 'setup_overrides': None, 'override_templates': False, 'release': 'xenial', 'version': 16.04, 'family': 'ubuntu', 'arch': 'amd64'}
2017-11-03 19:48:00,992 - tests.cloud_tests - INFO - acquiring image for os: xenial
2017-11-03 19:48:10,005 - tests.cloud_tests - DEBUG - updating args for setup with: None
2017-11-03 19:48:10,005 - tests.cloud_tests - INFO - setting up ubuntu-xenial
2017-11-03 19:48:10,005 - tests.cloud_tests - DEBUG - execute (query version for package: cloud-init): dpkg-query -W '--showformat=${Version}' cloud-init
2017-11-03 19:48:10,327 - tests.cloud_tests - DEBUG - after setup complete, installed cloud-init version is: b'0.7.9-233-ge586fe35-0ubuntu1~16.04.2'
2017-11-03 19:48:10,327 - tests.cloud_tests - INFO - generating SSH keys
2017-11-03 19:48:10,925 - tests.cloud_tests - DEBUG - creating snapshot for xenial
2017-11-03 19:48:10,942 - tests.cloud_tests - INFO - collecting test data for os: xenial
2017-11-03 19:48:10,946 - tests.cloud_tests - INFO - collecting test data for test: modules/final_message
2017-11-03 19:48:11,966 - tests.cloud_tests - DEBUG - execute: sh -c 'i=0; while [ $i -lt 120 ] && i=$(($i+1)); do [ $(systemctl is-system-running) = '"'"'running'"'"' -o $(systemctl is-system-running) = '"'"'degraded'"'"' ] && [ -f '"'"'/run/cloud-init/result.json'"'"' ] && exit 0; sleep 1; done; exit 1'
2017-11-03 19:48:39,322 - tests.cloud_tests - DEBUG - running collect script: cloud-init.log
2017-11-03 19:48:39,322 - tests.cloud_tests - DEBUG - execute (collect: cloud-init.log): sh -c 'set -e; s="$1"; shift; cat > "$s"; trap "rm -f $s" EXIT; chmod +x "$s"; "$s" "$@"' runscript /tmp/NoCloudKVMInstance-0000
2017-11-03 19:48:59,692 - tests.cloud_tests - DEBUG - running collect script: cloud-init-output.log
2017-11-03 19:48:59,692 - tests.cloud_tests - DEBUG - execute (collect: cloud-init-output.log): sh -c 'set -e; s="$1"; shift; cat > "$s"; trap "rm -f $s" EXIT; chmod +x "$s"; "$s" "$@"' runscript /tmp/NoCloudKVMInstance-0001
2017-11-03 19:49:19,816 - tests.cloud_tests - DEBUG - running collect script: instance-id
2017-11-03 19:49:19,816 - tests.cloud_tests - DEBUG - execute (collect: instance-id): sh -c 'set -e; s="$1"; shift; cat > "$s"; trap "rm -f $s" EXIT; chmod +x "$s"; "$s" "$@"' runscript /tmp/NoCloudKVMInstance-0002
2017-11-03 19:49:39,841 - tests.cloud_tests - DEBUG - running collect script: result.json
2017-11-03 19:49:39,841 - tests.cloud_tests - DEBUG - execute (collect: result.json): sh -c 'set -e; s="$1"; shift; cat > "$s"; trap "rm -f $s" EXIT; chmod +x "$s"; "$s" "$@"' runscript /tmp/NoCloudKVMInstance-0003
2017-11-03 19:49:59,866 - tests.cloud_tests - DEBUG - running collect script: status.json
2017-11-03 19:49:59,866 - tests.cloud_tests - DEBUG - execute (collect: status.json): sh -c 'set -e; s="$1"; shift; cat > "$s"; trap "rm -f $s" EXIT; chmod +x "$s"; "$s" "$@"' runscript /tmp/NoCloudKVMInstance-0004
2017-11-03 19:50:19,895 - tests.cloud_tests - DEBUG - running collect script: cloud-init-version
2017-11-03 19:50:19,895 - tests.cloud_tests - DEBUG - execute (collect: cloud-init-version): sh -c 'set -e; s="$1"; shift; cat > "$s"; trap "rm -f $s" EXIT; chmod +x "$s"; "$s" "$@"' runscript /tmp/NoCloudKVMInstance-0005
2017-11-03 19:50:39,931 - tests.cloud_tests - DEBUG - getting console log
2017-11-03 19:50:39,934 - tests.cloud_tests - DEBUG - collect stages: {'name': 'collect data', 'time': 158.9706048965454, 'errors': [], 'stages': [{'name': 'collect for platform: nocloud-kvm', 'time': 158.96538615226746, 'errors': [], 'stages': [{'name': 'set up and collect data for os: xenial', 'time': 149.92899918556213, 'errors': [], 'stages': [{'name': 'set up for ubuntu-xenial', 'time': 4.76837158203125e-07, 'errors': [], 'stages': [], 'success': True}, {'name': 'collect test data for xenial', 'time': 148.99193692207336, 'errors': [], 'stages': [{'name': 'collect for test: modules/final_message', 'time': 148.97483205795288, 'errors': [], 'stages': [{'name': 'boot instance', 'time': 28.366244077682495, 'errors': [], 'success': True}, {'name': 'script cloud-init.log', 'time': 20.369430780410767, 'errors': [], 'success': True}, {'name': 'script cloud-init-output.log', 'time': 20.12406063079834, 'errors': [], 'success': True}, {'name': 'script instance-id', 'time': 20.024903059005737, 'errors': [], 'success': True}, {'name': 'script result.json', 'time': 20.02480125427246, 'errors': [], 'success': True}, {'name': 'script status.json', 'time': 20.029194831848145, 'errors': [], 'success': True}, {'name': 'script cloud-init-version', 'time': 20.035847663879395, 'errors': [], 'success': True}, {'name': 'collect console', 'time': 0.0002415180206298828, 'errors': [], 'success': True}], 'success': True}], 'success': True}], 'success': True}], 'success': True}], 'success': True}
2017-11-03 19:50:39,935 - tests.cloud_tests - DEBUG - found test data: {'nocloud-kvm': {'xenial': ['modules/final_message']}}
2017-11-03 19:50:39,935 - tests.cloud_tests - INFO - test: platform='nocloud-kvm', os='xenial' verifying test data
2017-11-03 19:50:39,935 - tests.cloud_tests - DEBUG - verifying test data for modules/final_message
test_final_message_string (tests.cloud_tests.testcases.modules.final_message.TestFinalMessage)
Ensure final handles regular strings. ... ok
test_final_message_subs (tests.cloud_tests.testcases.modules.final_message.TestFinalMessage)
Test variable substitution in final message. ... ok
test_no_stages_errors (tests.cloud_tests.testcases.modules.final_message.TestFinalMessage)
Ensure that there were no errors in any stage. ... ok
test_no_warnings_in_log (tests.cloud_tests.testcases.modules.final_message.TestFinalMessage)
Warnings should not be found in the log. ... ok
----------------------------------------------------------------------
Ran 4 tests in 0.001s
OK
2017-11-03 19:50:39,940 - tests.cloud_tests - INFO - test: platform='nocloud-kvm', os='xenial' passed all tests
2017-11-03 19:50:39,940 - tests.cloud_tests - DEBUG - verify results: {'nocloud-kvm': {'xenial': {'modules/final_message': {'passed': True, 'failures': []}}}}
2017-11-03 19:50:39,940 - tests.cloud_tests - INFO - leaving data in /tmp/cloud-init/results.nocloud-kvm.d