Skip to content

Commit 41e408d

Browse files
committed
Revert "test: add a test for bc"
This reverts commit b1aa1a6.
1 parent 4d29a72 commit 41e408d

File tree

1 file changed

+0
-60
lines changed

1 file changed

+0
-60
lines changed

tests/system.rs

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ const INPUT_ERR: &str = "test_err.c";
9090
const INPUT_MACRO_EXPANSION: &str = "test_macro_expansion.c";
9191
const INPUT_WITH_DEFINE: &str = "test_with_define.c";
9292
const OUTPUT: &str = "test.o";
93-
const OUTPUT_BC: &str = "test.bc";
9493

9594
// Copy the source files into the tempdir so we can compile with relative paths, since the commandline winds up in the hash key.
9695
fn copy_to_tempdir(inputs: &[&str], tempdir: &Path) {
@@ -149,59 +148,6 @@ fn test_basic_compile(compiler: Compiler, tempdir: &Path) {
149148
});
150149
}
151150

152-
fn test_basic_compile_bc(compiler: Compiler, tempdir: &Path) {
153-
let Compiler {
154-
name,
155-
exe,
156-
env_vars,
157-
} = compiler;
158-
trace!("run_sccache_command_test: {}", name);
159-
// Compile a source file.
160-
copy_to_tempdir(&[INPUT, INPUT_ERR], tempdir);
161-
162-
let out_file = tempdir.join(OUTPUT);
163-
trace!("compile");
164-
sccache_command()
165-
.args(&compile_cmdline(
166-
name,
167-
&exe,
168-
INPUT,
169-
OUTPUT_BC,
170-
vec!["-emit-llvm".into()],
171-
))
172-
.current_dir(tempdir)
173-
.envs(env_vars.clone())
174-
.assert()
175-
.success();
176-
assert!(fs::metadata(&out_file).map(|m| m.len() > 0).unwrap());
177-
trace!("request stats");
178-
get_stats(|info| {
179-
assert_eq!(5, info.stats.compile_requests);
180-
assert_eq!(5, info.stats.requests_executed);
181-
assert_eq!(1, info.stats.cache_hits.all());
182-
assert_eq!(4, info.stats.cache_misses.all());
183-
assert_eq!(&4, info.stats.cache_misses.get("C/C++").unwrap());
184-
});
185-
trace!("compile");
186-
fs::remove_file(&out_file).unwrap();
187-
sccache_command()
188-
.args(&compile_cmdline(name, &exe, INPUT, OUTPUT, Vec::new()))
189-
.current_dir(tempdir)
190-
.envs(env_vars)
191-
.assert()
192-
.success();
193-
assert!(fs::metadata(&out_file).map(|m| m.len() > 0).unwrap());
194-
trace!("request stats");
195-
get_stats(|info| {
196-
assert_eq!(6, info.stats.compile_requests);
197-
assert_eq!(6, info.stats.requests_executed);
198-
assert_eq!(2, info.stats.cache_hits.all());
199-
assert_eq!(4, info.stats.cache_misses.all());
200-
assert_eq!(&2, info.stats.cache_hits.get("C/C++").unwrap());
201-
assert_eq!(&4, info.stats.cache_misses.get("C/C++").unwrap());
202-
});
203-
}
204-
205151
fn test_noncacheable_stats(compiler: Compiler, tempdir: &Path) {
206152
let Compiler {
207153
name,
@@ -421,11 +367,8 @@ fn test_compile_with_define(compiler: Compiler, tempdir: &Path) {
421367
}
422368

423369
fn run_sccache_command_tests(compiler: Compiler, tempdir: &Path) {
424-
println!("Testing with {}", compiler.name);
425-
426370
test_basic_compile(compiler.clone(), tempdir);
427371
test_compile_with_define(compiler.clone(), tempdir);
428-
429372
if compiler.name == "cl.exe" {
430373
test_msvc_deps(compiler.clone(), tempdir);
431374
}
@@ -439,9 +382,6 @@ fn run_sccache_command_tests(compiler: Compiler, tempdir: &Path) {
439382

440383
// If we are testing with clang-14 or later, we expect the -fminimize-whitespace flag to be used.
441384
if compiler.name == "clang" {
442-
// needs -emit-llvm
443-
test_basic_compile_bc(compiler.clone(), tempdir);
444-
445385
let version_cmd = Command::new(compiler.name)
446386
.arg("--version")
447387
.output()

0 commit comments

Comments
 (0)