@@ -668,18 +668,29 @@ def list_tests():
668
668
for test in data ["tests" ]:
669
669
working_dir = get_property (test , "WORKING_DIRECTORY" )
670
670
labels = []
671
+ machine_suffix = self .build_opts .host_type .as_tuple_string ()
672
+ labels .append ("tpx_test_config::buildsystem=getdeps" )
673
+ labels .append ("tpx_test_config::platform={}" .format (machine_suffix ))
674
+
671
675
if get_property (test , "DISABLED" ):
672
676
labels .append ("disabled" )
673
677
command = test ["command" ]
674
678
if working_dir :
675
679
command = [cmake , "-E" , "chdir" , working_dir ] + command
680
+
681
+ import os
682
+
676
683
tests .append (
677
684
{
678
685
"type" : "custom" ,
679
686
"target" : "%s-%s-getdeps-%s"
680
687
% (self .manifest .name , test ["name" ], machine_suffix ),
681
688
"command" : command ,
682
689
"labels" : labels ,
690
+ "env" : {},
691
+ "required_paths" : [],
692
+ "contacts" : [],
693
+ "cwd" : os .getcwd (),
683
694
}
684
695
)
685
696
return tests
@@ -689,36 +700,51 @@ def list_tests():
689
700
# better signals for flaky tests.
690
701
retry = 0
691
702
703
+ from sys import platform
704
+
692
705
testpilot = path_search (env , "testpilot" )
693
- if testpilot and not no_testpilot :
706
+ tpx = path_search (env , "tpx" )
707
+ if (tpx or testpilot ) and not no_testpilot :
694
708
buck_test_info = list_tests ()
709
+ import os
710
+
695
711
buck_test_info_name = os .path .join (self .build_dir , ".buck-test-info.json" )
696
712
with open (buck_test_info_name , "w" ) as f :
697
713
json .dump (buck_test_info , f )
698
714
699
715
env .set ("http_proxy" , "" )
700
716
env .set ("https_proxy" , "" )
701
- machine_suffix = self .build_opts .host_type .as_tuple_string ()
702
-
703
717
runs = []
704
-
705
- testpilot_args = [
706
- testpilot ,
707
- # Need to force the repo type otherwise testpilot on windows
708
- # can be confused (presumably sparse profile related)
709
- "--force-repo" ,
710
- "fbcode" ,
711
- "--force-repo-root" ,
712
- self .build_opts .fbsource_dir ,
713
- "--buck-test-info" ,
714
- buck_test_info_name ,
715
- "--retry=%d" % retry ,
716
- "-j=%s" % str (self .build_opts .num_jobs ),
717
- "--test-config" ,
718
- "platform=%s" % machine_suffix ,
719
- "buildsystem=getdeps" ,
720
- "--print-long-results" ,
721
- ]
718
+ from sys import platform
719
+
720
+ if platform == "win32" :
721
+ machine_suffix = self .build_opts .host_type .as_tuple_string ()
722
+ testpilot_args = [
723
+ testpilot ,
724
+ # Need to force the repo type otherwise testpilot on windows
725
+ # can be confused (presumably sparse profile related)
726
+ "--force-repo" ,
727
+ "fbcode" ,
728
+ "--force-repo-root" ,
729
+ self .build_opts .fbsource_dir ,
730
+ "--buck-test-info" ,
731
+ buck_test_info_name ,
732
+ "--retry=%d" % retry ,
733
+ "-j=%s" % str (self .build_opts .num_jobs ),
734
+ "--test-config" ,
735
+ "platform=%s" % machine_suffix ,
736
+ "buildsystem=getdeps" ,
737
+ "--print-long-results" ,
738
+ ]
739
+ else :
740
+ testpilot_args = [
741
+ tpx ,
742
+ "--buck-test-info" ,
743
+ buck_test_info_name ,
744
+ "--retry=%d" % retry ,
745
+ "-j=%s" % str (self .build_opts .num_jobs ),
746
+ "--print-long-results" ,
747
+ ]
722
748
723
749
if owner :
724
750
testpilot_args += ["--contacts" , owner ]
0 commit comments