File tree Expand file tree Collapse file tree 5 files changed +42
-6
lines changed Expand file tree Collapse file tree 5 files changed +42
-6
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ pipeline {
6262 }
6363 }
6464 }
65- stage (' AArch64 Unit Tests' ) {
65+ stage (' AArch64 Tests' ) {
6666 agent { node { label ' focal-arm64' } }
6767 stages {
6868 stage (' Checkout' ) {
@@ -75,6 +75,14 @@ pipeline {
7575 sh " scripts/dev_cli.sh tests --unit"
7676 }
7777 }
78+ stage(' Run integration tests' ) {
79+ options {
80+ timeout(time : 1 , unit : ' HOURS' )
81+ }
82+ steps {
83+ sh " scripts/dev_cli.sh tests --integration"
84+ }
85+ }
7886 }
7987 }
8088 }
Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ cmd_tests() {
317317 shift
318318 arg_vols=" $1 "
319319 ;;
320- " --all" ) { cargo=true; unit=true; [ " $arch " = " x86_64 " ] && integration=true; } ;;
320+ " --all" ) { cargo=true; unit=true; integration=true; } ;;
321321 " --" ) { shift ; break ; } ;;
322322 * )
323323 die " Unknown tests argument: $1 . Please use --help for help."
@@ -326,10 +326,7 @@ cmd_tests() {
326326 shift
327327 done
328328
329- if [ " $( uname -m) " = " aarch64" ] ; then
330- if [ " $integration " = true ] ; then
331- die " Integration test is not supported for aarch64."
332- fi
329+ if [ " $arch " = " aarch64" ] ; then
333330 if [ " $integration_coreboot " = true ] ; then
334331 die " coreboot integration test is not supported for aarch64."
335332 fi
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ fetch_ch() {
77 CH_VERSION=" v32.0"
88 CH_URL_BASE=" https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/$CH_VERSION "
99
10+ [ " $CH_ARCH " = " aarch64" ] && CH_NAME=" cloud-hypervisor-static-aarch64"
1011 [ " $CH_ARCH " = " x86_64" ] && CH_NAME=" cloud-hypervisor"
1112 CH_URL=" $CH_URL_BASE /$CH_NAME "
1213
@@ -46,6 +47,11 @@ fetch_raw_ubuntu_image() {
4647 convert_image " $OS_IMAGE_NAME " " $OS_RAW_IMAGE_NAME "
4748}
4849
50+ aarch64_fetch_disk_images () {
51+ fetch_raw_ubuntu_image " focal" " arm64"
52+ fetch_raw_ubuntu_image " jammy" " arm64"
53+ }
54+
4955x86_64_fetch_disk_images () {
5056 CLEAR_OS_IMAGE_NAME=" clear-31311-cloudguest.img"
5157 CLEAR_OS_URL_BASE=" https://cloud-hypervisor.azureedge.net/"
@@ -62,6 +68,7 @@ fetch_disk_images() {
6268
6369 pushd " $WORKLOADS_DIR "
6470
71+ [ " $ARCH " = " aarch64" ] && aarch64_fetch_disk_images
6572 [ " $ARCH " = " x86_64" ] && x86_64_fetch_disk_images
6673
6774 popd
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ fetch_ch "$CH_PATH" "$arch"
1414
1515fetch_disk_images " $WORKLOADS_DIR " " $arch "
1616
17+ [ " $arch " = " aarch64" ] && target=" aarch64-unknown-none"
1718[ " $arch " = " x86_64" ] && target=" x86_64-unknown-none"
1819
1920rustup component add rust-src
Original file line number Diff line number Diff line change @@ -465,9 +465,13 @@ mod tests {
465465 path : & ' a str ,
466466 }
467467
468+ #[ cfg( target_arch = "aarch64" ) ]
469+ const TARGET_TRIPLE : & str = "aarch64-unknown-none" ;
468470 #[ cfg( target_arch = "x86_64" ) ]
469471 const TARGET_TRIPLE : & str = "x86_64-unknown-none" ;
470472
473+ #[ cfg( target_arch = "aarch64" ) ]
474+ const QEMU_NAME : & str = "qemu-system-aarch64" ;
471475 #[ cfg( target_arch = "x86_64" ) ]
472476 const QEMU_NAME : & str = "qemu-system-x86_64" ;
473477
@@ -605,6 +609,25 @@ mod tests {
605609 handle_child_output ( & tmp_dir, r, & output) ;
606610 }
607611
612+ mod aarch64 {
613+ use super :: * ;
614+
615+ const FOCAL_IMAGE_NAME : & str = "focal-server-cloudimg-arm64-raw.img" ;
616+ const JAMMY_IMAGE_NAME : & str = "jammy-server-cloudimg-arm64-raw.img" ;
617+
618+ #[ test]
619+ #[ cfg( not( feature = "coreboot" ) ) ]
620+ fn test_boot_ch_focal ( ) {
621+ test_boot ( FOCAL_IMAGE_NAME , & UbuntuCloudInit { } , spawn_ch)
622+ }
623+
624+ #[ test]
625+ #[ cfg( not( feature = "coreboot" ) ) ]
626+ fn test_boot_ch_jammy ( ) {
627+ test_boot ( JAMMY_IMAGE_NAME , & UbuntuCloudInit { } , spawn_ch)
628+ }
629+ }
630+
608631 mod x86_64 {
609632 use super :: * ;
610633
You can’t perform that action at this time.
0 commit comments