mirror of
				https://github.com/kata-containers/kata-containers.git
				synced 2025-11-04 03:29:55 +00:00 
			
		
		
		
	tools/osbuilder/tests: Remove TRAVIS variable
The last remaining user of the TRAVIS variable in this repo is tools/osbuilder/tests and it is only used to skip spinning up VMs. Travis didn't support virtualization and the same is true for github actions hosted runners. Replace the variable with KVM_MISSING and determine availability of /dev/kvm at runtime. TRAVIS is also used by '.ci/setup.sh' in kata-containers/tests to reduce the set of dependencies that gets installed, but this is also in the process of being removed. Fixes: #3544 Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
		
							
								
								
									
										1
									
								
								.github/workflows/static-checks.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/static-checks.yaml
									
									
									
									
										vendored
									
									
								
							@@ -19,7 +19,6 @@ jobs:
 | 
			
		||||
          - "make test"
 | 
			
		||||
          - "sudo -E PATH=\"$PATH\" make test"
 | 
			
		||||
    env:
 | 
			
		||||
      TRAVIS: "true"
 | 
			
		||||
      RUST_BACKTRACE: "1"
 | 
			
		||||
      target_branch: ${{ github.base_ref }}
 | 
			
		||||
    steps:
 | 
			
		||||
 
 | 
			
		||||
@@ -32,6 +32,7 @@ readonly KATA_HYPERVISOR="${KATA_HYPERVISOR:-}"
 | 
			
		||||
readonly KATA_DEV_MODE="${KATA_DEV_MODE:-}"
 | 
			
		||||
readonly ci_results_dir="/var/osbuilder/tests"
 | 
			
		||||
readonly dracut_dir=${project_dir}/dracut
 | 
			
		||||
readonly KVM_MISSING="$([ -e /dev/kvm ] || echo true)"
 | 
			
		||||
 | 
			
		||||
build_images=1
 | 
			
		||||
build_initrds=1
 | 
			
		||||
@@ -166,7 +167,7 @@ exit_handler()
 | 
			
		||||
		rm -rf "${tmp_dir}"
 | 
			
		||||
 | 
			
		||||
		# Restore the default image in config file
 | 
			
		||||
		[ -n "${TRAVIS:-}" ] || run_mgr configure-image
 | 
			
		||||
		[ -n "${KVM_MISSING:-}" ] || run_mgr configure-image
 | 
			
		||||
 | 
			
		||||
		return
 | 
			
		||||
	fi
 | 
			
		||||
@@ -258,8 +259,7 @@ set_runtime()
 | 
			
		||||
 | 
			
		||||
	[ -n "${KATA_DEV_MODE}" ] && return
 | 
			
		||||
 | 
			
		||||
	# Travis doesn't support VT-x
 | 
			
		||||
	[ -n "${TRAVIS:-}" ] && return
 | 
			
		||||
	[ -n "${KVM_MISSING:-}" ] && return
 | 
			
		||||
 | 
			
		||||
	if [ "$KATA_HYPERVISOR" != "firecracker" ]; then
 | 
			
		||||
		if [ -f "$sysconfig_docker_config_file" ]; then
 | 
			
		||||
@@ -285,8 +285,7 @@ setup()
 | 
			
		||||
		sudo -E mkdir -p ${ci_results_dir}
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
	# Travis doesn't support VT-x
 | 
			
		||||
	[ -n "${TRAVIS:-}" ] && return
 | 
			
		||||
	[ -n "${KVM_MISSING:-}" ] && return
 | 
			
		||||
 | 
			
		||||
	[ ! -d "${tests_repo_dir}" ] && git clone "https://${tests_repo}" "${tests_repo_dir}"
 | 
			
		||||
 | 
			
		||||
@@ -383,8 +382,7 @@ install_image_create_container()
 | 
			
		||||
	[ -z "$file" ] && die "need file"
 | 
			
		||||
	[ ! -e "$file" ] && die "file does not exist: $file"
 | 
			
		||||
 | 
			
		||||
	# Travis doesn't support VT-x
 | 
			
		||||
	[ -n "${TRAVIS:-}" ] && return
 | 
			
		||||
	[ -n "${KVM_MISSING:-}" ] && return
 | 
			
		||||
 | 
			
		||||
	showKataRunFailure=1
 | 
			
		||||
	run_mgr reset-config
 | 
			
		||||
@@ -401,8 +399,7 @@ install_initrd_create_container()
 | 
			
		||||
	[ -z "$file" ] && die "need file"
 | 
			
		||||
	[ ! -e "$file" ] && die "file does not exist: $file"
 | 
			
		||||
 | 
			
		||||
	# Travis doesn't support VT-x
 | 
			
		||||
	[ -n "${TRAVIS:-}" ] && return
 | 
			
		||||
	[ -n "${KVM_MISSING:-}" ] && return
 | 
			
		||||
 | 
			
		||||
	showKataRunFailure=1
 | 
			
		||||
	run_mgr reset-config
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user