22# Use of this source code is governed by a BSD-style license that can be
33# found in the LICENSE file.
44
5- import (" //build/testing/host_test .gni" )
5+ import (" //build/go/go_test .gni" )
66
77if (is_host ) {
88 # Add this to go_test()'s environments to disable a test in infra
@@ -232,12 +232,11 @@ template("system_test_upgrade_suite") {
232232
233233 foreach (test , _tests ) {
234234 _test_name = get_label_info (test , " name" )
235- _test_binary = " $root_out_dir /$_test_name "
236235
237236 _host_test_target_name = " ${ target_name } _${ _test_name } "
238237 _deps += [ " :${ _host_test_target_name } " ]
239238
240- _args = [ " -test.v " ] # Print test detailed case status
239+ _args = []
241240
242241 foreach (build , _builds ) {
243242 if (defined (build .release_build_id )) {
@@ -272,10 +271,6 @@ template("system_test_upgrade_suite") {
272271 if (defined (invoker .timeout )) {
273272 assert (invoker .timeout != " " ,
274273 " '${ _host_test_target_name } ' cannot have an empty timeout" )
275- _args += [
276- " -test.timeout" ,
277- invoker .timeout ,
278- ]
279274 }
280275
281276 if (defined (invoker .pave_timeout )) {
@@ -400,10 +395,10 @@ template("system_test_upgrade_suite") {
400395 _args += [ " --resolver-mode=constant" ]
401396 }
402397
403- host_test (_host_test_target_name ) {
404- binary_path = _test_binary
398+ go_test (_host_test_target_name ) {
399+ library = " //src/sys/pkg/tests/system-tests/upgrade_test:gopkg "
405400 args = _args
406- deps = [ test ]
401+ forward_variables_from ( invoker , [ " timeout " ])
407402
408403 environments = []
409404 foreach (env , invoker .environments ) {
@@ -490,12 +485,11 @@ template("system_test_reboot_suite") {
490485
491486 foreach (test , _tests ) {
492487 _test_name = get_label_info (test , " name" )
493- _test_binary = " $root_out_dir /$_test_name "
494488
495489 _host_test_target_name = " ${ target_name } _${ _test_name } "
496490 _deps += [ " :${ _host_test_target_name } " ]
497491
498- _args = [ " -test.v " ] # Print test detailed case status
492+ _args = []
499493
500494 if (defined (invoker .release_builder )) {
501495 _args += [
@@ -521,10 +515,6 @@ template("system_test_reboot_suite") {
521515 if (defined (invoker .timeout )) {
522516 assert (invoker .timeout != " " ,
523517 " '${ _host_test_target_name } ' cannot have an empty timeout" )
524- _args += [
525- " -test.timeout" ,
526- invoker .timeout ,
527- ]
528518 }
529519
530520 if (defined (invoker .cycle_timeout )) {
@@ -570,10 +560,10 @@ template("system_test_reboot_suite") {
570560 _args += [ " --check-abr=false" ]
571561 }
572562
573- host_test (_host_test_target_name ) {
574- binary_path = _test_binary
563+ go_test (_host_test_target_name ) {
564+ library = " //src/sys/pkg/tests/system-tests/reboot_test:gopkg "
575565 args = _args
576- deps = [ test ]
566+ forward_variables_from ( invoker , [ " timeout " ])
577567
578568 environments = []
579569 foreach (env , invoker .environments ) {
@@ -655,12 +645,11 @@ template("system_test_recovery_suite") {
655645
656646 foreach (test , _tests ) {
657647 _test_name = get_label_info (test , " name" )
658- _test_binary = " $root_out_dir /$_test_name "
659648
660649 _host_test_target_name = " ${ target_name } _${ _test_name } "
661650 _deps += [ " :${ _host_test_target_name } " ]
662651
663- _args = [ " -test.v " ] # Print test detailed case status
652+ _args = []
664653
665654 if (defined (invoker .release_builder )) {
666655 _args += [
@@ -686,10 +675,6 @@ template("system_test_recovery_suite") {
686675 if (defined (invoker .timeout )) {
687676 assert (invoker .timeout != " " ,
688677 " '${ _host_test_target_name } ' cannot have an empty timeout" )
689- _args += [
690- " -test.timeout" ,
691- invoker .timeout ,
692- ]
693678 }
694679
695680 if (defined (invoker .cycle_timeout )) {
@@ -726,10 +711,10 @@ template("system_test_recovery_suite") {
726711 _args += [ " --check-abr=false" ]
727712 }
728713
729- host_test (_host_test_target_name ) {
730- binary_path = _test_binary
714+ go_test (_host_test_target_name ) {
715+ library = " //src/sys/pkg/tests/system-tests/recovery_test:gopkg "
731716 args = _args
732- deps = [ test ]
717+ forward_variables_from ( invoker , [ " timeout " ])
733718
734719 environments = []
735720 foreach (env , invoker .environments ) {
0 commit comments