diff --git a/Makefile.am b/Makefile.am index a0198839..4ef2e453 100644 --- a/Makefile.am +++ b/Makefile.am @@ -122,6 +122,7 @@ BATS = \ test/functional/bundleadd/add-directory.bats \ test/functional/bundleadd/add-fall-back-to-fullfile.bats \ test/functional/bundleadd/add-include.bats \ + test/functional/bundleadd/add-install-time.bats \ test/functional/bundleadd/add-multiple.bats \ test/functional/bundleadd/add-no-signature.bats \ test/functional/bundleadd/add-skip-scripts.bats \ diff --git a/test/functional/bundleadd/add-install-time.bats b/test/functional/bundleadd/add-install-time.bats new file mode 100755 index 00000000..98ffa775 --- /dev/null +++ b/test/functional/bundleadd/add-install-time.bats @@ -0,0 +1,51 @@ +#!/usr/bin/env bats + +load "../testlib" + +test_setup() { + + create_test_environment "$TEST_NAME" + create_bundle -n bundle1 -f /file1,/file2 "$TEST_NAME" + +} + +@test "ADD030: Add a bundle showing detailed installation time" { + + run sudo sh -c "$SWUPD bundle-add $SWUPD_OPTS bundle1 -t" + + assert_status_is 0 + + expected_output=$(cat <<-EOM + Starting download of remaining update content. This may take a while... + Finishing download of update content... + Installing bundle\(s\) files... + Calling post-update helper scripts. + Successfully installed 1 bundle + Raw elapsed time stats: + .* ms: Total execution time + .* ms: Prepend bundles to list + .* ms: Install bundles + .* ms: Add bundles and recurse + .* ms: Consolidate files from bundles + .* ms: Check disk space availability + .* ms: Download packs + .* ms: Download missing files + .* ms: Installing bundle\(s\) files onto filesystem + .* ms: Run Scripts + CPU process time stats: + .* ms: Total execution time + .* ms: Prepend bundles to list + .* ms: Install bundles + .* ms: Add bundles and recurse + .* ms: Consolidate files from bundles + .* ms: Check disk space availability + .* ms: Download packs + .* ms: Download missing files + .* ms: Installing bundle\(s\) files onto filesystem + .* ms: Run Scripts + EOM + ) + + assert_regex_is_output "$expected_output" + +}