Skip to content

Commit 34b71b4

Browse files
author
Tamas Vajk
committed
Use formatted source for compile_data_generated test
The unformatted source caused CI failures: - --config=rustfmt aspect caught the formatting issue during build - rustfmt_failure_tester.sh couldn't format it due to norustfmt tag Use a properly formatted source instead. The test still exercises the code path where compile_data has a generated file (triggering transform_sources), verifying that rustfmt correctly finds and checks the sources rather than silently skipping them.
1 parent 8dd4c70 commit 34b71b4

3 files changed

Lines changed: 3 additions & 8 deletions

File tree

test/rustfmt/rustfmt_failure_tester.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ EOF
8686
check_build_result $TEST_OK ${variant}_formatted_2015_test
8787
check_build_result $TEST_OK ${variant}_formatted_2018_test
8888
check_build_result $TEST_OK ${variant}_generated_test
89-
check_build_result $TEST_FAILED ${variant}_compile_data_generated_test
9089
done
9190

9291
# Format a specific target
@@ -100,7 +99,6 @@ EOF
10099
check_build_result $TEST_OK ${variant}_formatted_2015_test
101100
check_build_result $TEST_OK ${variant}_formatted_2018_test
102101
check_build_result $TEST_OK ${variant}_generated_test
103-
check_build_result $TEST_OK ${variant}_compile_data_generated_test
104102
done
105103

106104
# Format all targets

test/rustfmt/rustfmt_integration_test_suite.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ def rustfmt_integration_test_suite(name, **kwargs):
121121

122122
rustfmt_test(
123123
name = "{}_compile_data_generated_test".format(variant),
124-
tags = ["manual"],
125124
targets = [":{}_compile_data_generated".format(variant)],
126125
)
127126

@@ -131,6 +130,7 @@ def rustfmt_integration_test_suite(name, **kwargs):
131130
"{}_unformatted_2015_test".format(variant),
132131
"{}_unformatted_2018_test".format(variant),
133132
"{}_generated_test".format(variant),
133+
"{}_compile_data_generated_test".format(variant),
134134
])
135135

136136
native.test_suite(
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
pub fn main()
2-
{
3-
println!(
4-
"compile_data_generated"
5-
);
1+
pub fn main() {
2+
println!("compile_data_generated");
63
}

0 commit comments

Comments
 (0)