@@ -432,16 +432,16 @@ cmd_help() {
432432 echo " The Firecracker testing system is based on pytest. All arguments after --"
433433 echo " will be passed through to pytest."
434434 echo " "
435- echo " Args for the ` test` itself:"
435+ echo " Args for the ' test' itself:"
436436 echo " -h, --help Print help"
437437 echo " -c, --cpuset-cpus cpulist Set a dedicated cpulist to be used by the tests."
438438 echo " -m, --cpuset-mems memlist Set a dedicated memlist to be used by the tests."
439439 echo " --performance Tweak various setting of the host running the tests (such as C- and P-states)"
440440 echo " to achieve consistent performance. Used for running performance tests in CI."
441441 echo " --ab Run A/B test."
442442 echo " --no-build Skip building step."
443- echo " --no-archive Skip archiving of ` test_result` after the test is done."
444- echo " --no-kvm-check Skip checking for ` /dev/kvm` presence."
443+ echo " --no-archive Skip archiving of ' test_result' after the test is done."
444+ echo " --no-kvm-check Skip checking for ' /dev/kvm' presence."
445445 echo " --no-artifacts-check Skip checking existing artifacts."
446446 echo " "
447447 echo " build_ci_artifacts [all|rootfs|kernels]"
@@ -452,18 +452,17 @@ cmd_help() {
452452 echo " Downloads artifacts from provided S3 URI (like s3://spec.ccfc.min/firecracker-ci/my_artifacts)"
453453 echo " and runs ./tools/setup-ci-artifacts.sh. for each of them."
454454 echo " If no arguments are provided, pulls newest artifacts from $DEFAULT_ARTIFACTS_S3_BUCKET "
455- echo " If ` --force` is specified, removes previous artifacts with same name"
455+ echo " If ' --force' is specified, removes previous artifacts with same name"
456456 echo " "
457- echo " set_current_artifacts s3_uri/directory name"
457+ echo " set_current_artifacts [ s3_uri/directory name] "
458458 echo " Sets the $LOCAL_ARTIFACTS_CURRENT_DIR_FILE to contain a local path where the artifacts should be."
459459 echo " Accepts some name used to generate the final directory name. Mainly used with S3 URI"
460- echo " like ` download_ci_artifacts` cmd . Alternatively it is possible to manually write local "
460+ echo " like ' download_ci_artifacts' . Alternatively it is possible to manually write local "
461461 echo " path to artifacts directory into $LOCAL_ARTIFACTS_CURRENT_DIR_FILE file"
462462 echo " "
463- echo " ensure_current_artifacts_are_set_up s3_uri/directory name"
463+ echo " ensure_current_artifacts [ s3_uri/directory name] "
464464 echo " Makes sure the $LOCAL_ARTIFACTS_CURRENT_DIR_FILE file contains a path to current artifacts."
465- echo " If file already exist, change it to point to specified artifacts. If file does not exist,"
466- echo " try to download artifacts from S3 and sets them as current."
465+ echo " If an optional path/URI is provided, try to set it as current artifacts."
467466 echo " "
468467
469468 cat << EOF
@@ -616,13 +615,13 @@ cmd_download_ci_artifacts() {
616615 FORCE_ARTIFACT_DOWNLOAD=1
617616 shift 1
618617 fi
619- local artifacts =$@
618+ local artifacts_list =$@
620619
621- if [[ -z ${artifacts [@]} ]]; then
620+ if [[ -z ${artifacts_list [@]} ]]; then
622621 download_ci_artifacts
623622 else
624- for artifact in ${artifacts [@]} ; do
625- download_ci_artifacts $artifact
623+ for artifacts in ${artifacts_list [@]} ; do
624+ download_ci_artifacts $artifacts
626625 done
627626 fi
628627}
@@ -634,24 +633,19 @@ cmd_set_current_artifacts() {
634633 else
635634 local local_artifacts_path=$( get_local_artifacts_path $artifacts ) /$( uname -m)
636635 echo $local_artifacts_path > $LOCAL_ARTIFACTS_CURRENT_DIR_FILE
637- say " Current artifacts setup at " $local_artifacts_path
636+ say " Current artifacts path: " $local_artifacts_path
638637 fi
639638}
640639
641- cmd_ensure_current_artifacts_are_set_up () {
640+ cmd_ensure_current_artifacts () {
642641 local artifacts=$1
643642 if [ -f $LOCAL_ARTIFACTS_CURRENT_DIR_FILE ]; then
644- local current_local_artifacts_path=$( cat $LOCAL_ARTIFACTS_CURRENT_DIR_FILE )
645643 if [ -z $artifacts ]; then
646- say " Current artifacts already setup at " $current_local_artifacts_path
644+ local current_local_artifacts_path=$( cat $LOCAL_ARTIFACTS_CURRENT_DIR_FILE )
645+ say " Current artifacts path: " $current_local_artifacts_path
647646 else
648647 local local_artifacts_path=$( get_local_artifacts_path $artifacts ) /$( uname -m)
649- if [ $current_local_artifacts_path == $local_artifacts_path ]; then
650- say " Current artifacts already setup at " $current_local_artifacts_path
651- else
652- echo $local_artifacts_path > $LOCAL_ARTIFACTS_CURRENT_DIR_FILE
653- say " Current artifacts setup at " $local_artifacts_path
654- fi
648+ say " Current artifacts path: " $local_artifacts_path
655649 fi
656650 else
657651 if [ -z $artifacts ]; then
@@ -660,7 +654,7 @@ cmd_ensure_current_artifacts_are_set_up() {
660654 download_ci_artifacts $artifacts
661655 fi
662656 echo $LOCAL_ARTIFACTS_PATH > $LOCAL_ARTIFACTS_CURRENT_DIR_FILE
663- say " Current artifacts downloaded and setup at " $LOCAL_ARTIFACTS_PATH
657+ say " Current artifacts path: " $LOCAL_ARTIFACTS_PATH
664658 fi
665659}
666660
@@ -689,7 +683,7 @@ download_ci_artifacts() {
689683 ok_or_die " Failed to download artifacts using awscli!"
690684 cmd_sh " ./tools/setup-ci-artifacts.sh" $local_artifacts_path
691685 else
692- say " Found existing artifacts " $artifacts_arch " at: " $local_artifacts_path
686+ say " Found existing artifacts: " $artifacts_arch " at: " $local_artifacts_path
693687 fi
694688
695689 LOCAL_ARTIFACTS_PATH=$local_artifacts_path
@@ -851,9 +845,9 @@ cmd_test() {
851845 [ $do_build_dir_check != 0 ] && ensure_build_dir
852846 if [ $do_artifacts_check != 0 ]; then
853847 if [ -z $artifacts ]; then
854- cmd_ensure_current_artifacts_are_set_up
848+ cmd_ensure_current_artifacts
855849 else
856- cmd_ensure_current_artifacts_are_set_up $artifacts
850+ cmd_ensure_current_artifacts $artifacts
857851 fi
858852 fi
859853
@@ -1037,7 +1031,7 @@ cmd_sh() {
10371031
10381032cmd_sandbox () {
10391033 cmd_build --release
1040- cmd_ensure_current_artifacts_are_set_up
1034+ cmd_ensure_current_artifacts
10411035 cmd_sh " tmux new env PYTEST_ADDOPTS=--pdbcls=IPython.terminal.debugger:TerminalPdb PYTHONPATH=tests IPYTHONDIR=\$ PWD/.ipython ipython -i ./tools/sandbox.py $@ "
10421036 cmd_fix_perms " .ipython"
10431037}
@@ -1059,12 +1053,12 @@ cmd_sandbox_native() {
10591053 pip3.11 install ipython requests requests_unixsocket2 psutil tenacity filelock
10601054 pip3.11 install jsonschema aws_embedded_metrics
10611055 pip3.11 install packaging pytest
1062- cmd_ensure_current_artifacts_are_set_up
1056+ cmd_ensure_current_artifacts
10631057 tmux neww sudo --preserve-env=HOME,PATH,TMUX env PYTHONPATH=tests IPYTHONDIR=\$ PWD/.ipython ipython -i ./tools/sandbox.py $@
10641058}
10651059
10661060cmd_test_debug () {
1067- cmd_ensure_current_artifacts_are_set_up
1061+ cmd_ensure_current_artifacts
10681062 cmd_sh " tmux new ./tools/test.sh --pdb $@ "
10691063}
10701064
0 commit comments