-check_download_dir || die
-run_pybot "10" || die
-copy_archives || die
-die_on_pybot_error || die
-prepare_test_parent || die
-check_download_dir || die
-run_pybot "10" || die
+# Support for interleaved measurements is kept for future.
+iterations=1 # 8
+for ((iter=0; iter<iterations; iter++)); do
+ if ((iter)); then
+ # Function reserve_and_cleanup_testbed has already cleaned it once,
+ # but we need to clean it explicitly on subsequent iterations.
+ ansible_playbook "cleanup" || die
+ fi
+ # Testing current first. Good for early failures or for API changes.
+ select_build "build_current" || die
+ check_download_dir || die
+ run_pybot || die
+ archive_parse_test_results "csit_current/${iter}" || die
+ die_on_pybot_error || die
+ # TODO: Use less heavy way to avoid apt remove failures.
+ ansible_playbook "cleanup" || die
+ select_build "build_parent" || die
+ check_download_dir || die
+ run_pybot || die
+ archive_parse_test_results "csit_parent/${iter}" || die
+ die_on_pybot_error || die
+done