]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
refactor(test): Improve duplicate tests in base suite
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 8 Aug 2021 17:13:16 +0000 (19:13 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 10 Aug 2021 13:38:25 +0000 (15:38 +0200)
test/suites/base.bash

index fd26f8be3a9a90d4ac1ec2be75d0b04289941d03..45249a42e6378db10766987e70dff0897358ca70 100644 (file)
@@ -110,11 +110,17 @@ base_tests() {
     expect_stat 'called for link' 2
 
     # -------------------------------------------------------------------------
-    TEST "No input file"
+    TEST "No existing input file"
 
     $CCACHE_COMPILE -c foo.c 2>/dev/null
     expect_stat 'no input file' 1
 
+    # -------------------------------------------------------------------------
+    TEST "No input file on command line"
+
+    $CCACHE_COMPILE -c -O2 2>/dev/null
+    expect_stat 'no input file' 1
+
     # -------------------------------------------------------------------------
     TEST "Called for preprocessing"
 
@@ -186,12 +192,6 @@ base_tests() {
     expect_stat 'cache miss' 1
     expect_missing out/foo.o
 
-    # -------------------------------------------------------------------------
-    TEST "No input file"
-
-    $CCACHE_COMPILE -c -O2 2>/dev/null
-    expect_stat 'no input file' 1
-
     # -------------------------------------------------------------------------
     TEST "No file extension"
 
@@ -661,12 +661,6 @@ b"
     expect_stat 'cache miss' 32
     expect_stat 'files in cache' 32
 
-    # -------------------------------------------------------------------------
-    TEST "Called for preprocessing"
-
-    $CCACHE_COMPILE -c test1.c -E >test1.i
-    expect_stat 'called for preprocessing' 1
-
     # -------------------------------------------------------------------------
     TEST "Direct .i compile"