@@ -29,8 +29,17 @@ macro_rules! integration_test {
29
29
} ;
30
30
}
31
31
32
- fn issue_link ( issue : usize ) -> String {
33
- format ! ( "https://github.com/pantsbuild/scie-pants/issues/{issue}" )
32
+ macro_rules! issue_link {
33
+ ( $issue: expr) => {
34
+ issue_link( $issue, "pantsbuild/scie-pants" )
35
+ } ;
36
+ ( $issue: expr, $repo: expr) => {
37
+ issue_link( $issue, $repo)
38
+ } ;
39
+ }
40
+
41
+ fn issue_link ( issue : usize , repo : & str ) -> String {
42
+ format ! ( "https://github.com/{repo}/issues/{issue}" )
34
43
}
35
44
36
45
fn decode_output ( output : Vec < u8 > ) -> Result < String > {
@@ -99,6 +108,7 @@ pub(crate) fn run_integration_tests(
99
108
test_tools ( scie_pants_scie, check) ;
100
109
test_pants_bin_name_handling ( scie_pants_scie) ;
101
110
test_pants_bootstrap_handling ( scie_pants_scie) ;
111
+ test_pants_bootstrap_stdout_silent ( scie_pants_scie) ;
102
112
test_tools_pex_reproducibility ( workspace_root, tools_pex_path, tools_pex_mismatch_warn) ;
103
113
test_pants_bootstrap_tools ( scie_pants_scie) ;
104
114
@@ -238,7 +248,7 @@ fn test_pants_bin_name_handling(scie_pants_scie: &Path) {
238
248
false ,
239
249
r#"
240
250
[GLOBAL]
241
- pants_version = "2.15.0rc5 "
251
+ pants_version = "2.18.0 "
242
252
[anonymous-telemetry]
243
253
enabled = false
244
254
"# ,
@@ -408,7 +418,7 @@ fn test_ignore_empty_pants_version_pants_sha(scie_pants_scie: &Path) {
408
418
409
419
let tmpdir = create_tempdir ( ) . unwrap ( ) ;
410
420
411
- let pants_release = "2.15 .0" ;
421
+ let pants_release = "2.18 .0" ;
412
422
let pants_toml_content = format ! (
413
423
r#"
414
424
[GLOBAL]
@@ -437,7 +447,7 @@ fn test_pants_from_pex_version(scie_pants_scie: &Path) {
437
447
438
448
let tmpdir = create_tempdir ( ) . unwrap ( ) ;
439
449
440
- let pants_release = "2.18.0.dev5 " ;
450
+ let pants_release = "2.18.0" ;
441
451
let pants_toml_content = format ! (
442
452
r#"
443
453
[GLOBAL]
@@ -816,15 +826,15 @@ fn test_self_downgrade(scie_pants_scie: &Path) {
816
826
fn test_caching_issue_129 ( scie_pants_scie : & Path ) {
817
827
integration_test ! (
818
828
"Verifying the build root does not influence caching ({issue})" ,
819
- issue = issue_link( 129 )
829
+ issue = issue_link! ( 129 )
820
830
) ;
821
831
let tmpdir = create_tempdir ( ) . unwrap ( ) ;
822
832
823
833
let scie_base = tmpdir. path ( ) . join ( "nce" ) ;
824
834
825
835
let pants_toml = r#"
826
836
[GLOBAL]
827
- pants_version = "2.15 .0"
837
+ pants_version = "2.18 .0"
828
838
[anonymous-telemetry]
829
839
enabled = false
830
840
"# ;
@@ -894,7 +904,7 @@ fn test_caching_issue_129(scie_pants_scie: &Path) {
894
904
fn test_custom_pants_toml_issue_153 ( scie_pants_scie : & Path ) {
895
905
integration_test ! (
896
906
"Verifying the PANTS_TOML env var is respected ({issue})" ,
897
- issue = issue_link( 153 )
907
+ issue = issue_link! ( 153 )
898
908
) ;
899
909
900
910
let tmpdir = create_tempdir ( ) . unwrap ( ) ;
@@ -978,7 +988,7 @@ fn test_pants_native_client_perms_issue_182(scie_pants_scie: &Path) {
978
988
integration_test ! (
979
989
"Verifying scie-pants sets executable perms on the Pants native client binary when \
980
990
present ({issue})",
981
- issue = issue_link( 182 )
991
+ issue = issue_link! ( 182 )
982
992
) ;
983
993
984
994
let tmpdir = create_tempdir ( ) . unwrap ( ) ;
@@ -1009,7 +1019,7 @@ fn test_pants_native_client_perms_issue_182(scie_pants_scie: &Path) {
1009
1019
fn test_non_utf8_env_vars_issue_198 ( scie_pants_scie : & Path ) {
1010
1020
integration_test ! (
1011
1021
"Verifying scie-pants is robust to environments with non-utf8 env vars present ({issue})" ,
1012
- issue = issue_link( 198 )
1022
+ issue = issue_link! ( 198 )
1013
1023
) ;
1014
1024
1015
1025
let tmpdir = create_tempdir ( ) . unwrap ( ) ;
@@ -1112,7 +1122,7 @@ fn test_bad_boot_error_text(scie_pants_scie: &Path) {
1112
1122
fn test_pants_bootstrap_urls ( scie_pants_scie : & Path ) {
1113
1123
integration_test ! (
1114
1124
"Verifying PANTS_BOOTSTRAP_URLS is used for both CPython interpreter and Pants PEX ({issue})" ,
1115
- issue = issue_link( 243 )
1125
+ issue = issue_link! ( 243 )
1116
1126
) ;
1117
1127
1118
1128
// This test runs in 4 parts:
@@ -1224,3 +1234,30 @@ fn test_pants_bootstrap_urls(scie_pants_scie: &Path) {
1224
1234
let stdout = decode_output ( output. stdout ) . unwrap ( ) ;
1225
1235
assert ! ( stdout. contains( pants_release) ) ;
1226
1236
}
1237
+
1238
+ fn test_pants_bootstrap_stdout_silent ( scie_pants_scie : & Path ) {
1239
+ integration_test ! (
1240
+ "Verifying scie-pants bootstraps Pants without any output on stdout ({issue})" ,
1241
+ issue = issue_link!( 20315 , "pantsbuild/pants" )
1242
+ ) ;
1243
+ // Bootstrap a new unseen version of Pants to verify there is no extra output on stdout besides
1244
+ // the requested output from the pants command.
1245
+ let ( output, _stderr) = assert_stderr_output (
1246
+ Command :: new ( scie_pants_scie)
1247
+ . arg ( "-V" )
1248
+ . env ( "PANTS_VERSION" , "2.19.1" )
1249
+ . stdout ( Stdio :: piped ( ) ) ,
1250
+ // Expect bootstrap messages to ensure we actually bootstrapped pants during this execution.
1251
+ vec ! [
1252
+ "Bootstrapping Pants 2.19.1" ,
1253
+ "Installing pantsbuild.pants==2.19.1 into a virtual environment at " ,
1254
+ "New virtual environment successfully created at " ,
1255
+ ] ,
1256
+ ExpectedResult :: Success ,
1257
+ ) ;
1258
+ let stdout = decode_output ( output. stdout ) . unwrap ( ) ;
1259
+ assert ! (
1260
+ stdout. eq( "2.19.1\n " ) ,
1261
+ "STDOUT was not '2.19.1':\n {stdout}\n "
1262
+ ) ;
1263
+ }
0 commit comments