@@ -90,7 +90,6 @@ const INPUT_ERR: &str = "test_err.c";
90
90
const INPUT_MACRO_EXPANSION : & str = "test_macro_expansion.c" ;
91
91
const INPUT_WITH_DEFINE : & str = "test_with_define.c" ;
92
92
const OUTPUT : & str = "test.o" ;
93
- const OUTPUT_BC : & str = "test.bc" ;
94
93
95
94
// Copy the source files into the tempdir so we can compile with relative paths, since the commandline winds up in the hash key.
96
95
fn copy_to_tempdir ( inputs : & [ & str ] , tempdir : & Path ) {
@@ -149,59 +148,6 @@ fn test_basic_compile(compiler: Compiler, tempdir: &Path) {
149
148
} ) ;
150
149
}
151
150
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
-
205
151
fn test_noncacheable_stats ( compiler : Compiler , tempdir : & Path ) {
206
152
let Compiler {
207
153
name,
@@ -421,11 +367,8 @@ fn test_compile_with_define(compiler: Compiler, tempdir: &Path) {
421
367
}
422
368
423
369
fn run_sccache_command_tests ( compiler : Compiler , tempdir : & Path ) {
424
- println ! ( "Testing with {}" , compiler. name) ;
425
-
426
370
test_basic_compile ( compiler. clone ( ) , tempdir) ;
427
371
test_compile_with_define ( compiler. clone ( ) , tempdir) ;
428
-
429
372
if compiler. name == "cl.exe" {
430
373
test_msvc_deps ( compiler. clone ( ) , tempdir) ;
431
374
}
@@ -439,9 +382,6 @@ fn run_sccache_command_tests(compiler: Compiler, tempdir: &Path) {
439
382
440
383
// If we are testing with clang-14 or later, we expect the -fminimize-whitespace flag to be used.
441
384
if compiler. name == "clang" {
442
- // needs -emit-llvm
443
- test_basic_compile_bc ( compiler. clone ( ) , tempdir) ;
444
-
445
385
let version_cmd = Command :: new ( compiler. name )
446
386
. arg ( "--version" )
447
387
. output ( )
0 commit comments