|
| 1 | +grep defproject project.clj | cut -d" " -f3 | xargs -I {} echo "(def circleci-test-version \"{}\")" > dev-resources/weasley/circleci.test.version |
| 2 | + |
| 3 | +lein install |
| 4 | + |
| 5 | +cd dev-resources/weasley/ |
| 6 | + |
| 7 | +lein do clean, compile |
| 8 | + |
| 9 | +# Counts between leiningen and circleci are off because of tests with global fixtures (ns3) |
| 10 | +lein test > test_out.txt && |
| 11 | +grep "Ran 33 tests containing 108 assertions." test_out.txt && |
| 12 | +lein update-in :aliases empty -- update-in : assoc :test-selectors '{:default (complement :global-fixture)}' -- test > test_out.txt && |
| 13 | +grep "Ran 18 tests containing 60 assertions." test_out.txt && |
| 14 | + |
| 15 | +lein tests weasley.sample-test-ns1 weasley.sample-test-ns2 > test_out.txt && |
| 16 | +grep "Ran 18 tests containing 60 assertions." test_out.txt && |
| 17 | +lein update-in :aliases empty -- test :only weasley.sample-test-ns1 weasley.sample-test-ns2 > test_out.txt && |
| 18 | +grep "Ran 18 tests containing 60 assertions." test_out.txt && |
| 19 | + |
| 20 | +lein tests weasley.sample-test-ns1 > test_out.txt && |
| 21 | +grep "Ran 3 tests containing 12 assertions." test_out.txt && |
| 22 | +lein update-in :aliases empty -- test :only weasley.sample-test-ns1 > test_out.txt && |
| 23 | +grep "Ran 3 tests containing 12 assertions." test_out.txt && |
| 24 | + |
| 25 | +lein tests weasley.sample-test-ns2 > test_out.txt && |
| 26 | +grep "Ran 15 tests containing 48 assertions." test_out.txt && |
| 27 | +lein update-in :aliases empty -- test :only weasley.sample-test-ns2 > test_out.txt && |
| 28 | +grep "Ran 15 tests containing 48 assertions." test_out.txt && |
| 29 | + |
| 30 | +lein tests weasley.sample-test-ns2 weasley.sample-test-ns2 weasley.sample-test-ns2 weasley.sample-test-ns2 > test_out.txt && |
| 31 | +grep "Ran 15 tests containing 48 assertions." test_out.txt && |
| 32 | +lein update-in :aliases empty -- test :only weasley.sample-test-ns2 weasley.sample-test-ns2 weasley.sample-test-ns2 > test_out.txt && |
| 33 | +grep "Ran 15 tests containing 48 assertions." test_out.txt && |
| 34 | + |
| 35 | +lein tests x y/z > test_out.txt && |
| 36 | +grep "Ran 0 tests containing 0 assertions." test_out.txt && |
| 37 | +lein update-in :aliases empty -- test :only x y/z > test_out.txt && |
| 38 | +grep "Ran 0 tests containing 0 assertions." test_out.txt && |
| 39 | + |
| 40 | +lein tests weasley.sample-test-ns2 weasley.sample-test-ns1/test-1 x y/z > test_out.txt && |
| 41 | +grep "Ran 16 tests containing 52 assertions." test_out.txt && |
| 42 | +lein update-in :aliases empty -- test :only weasley.sample-test-ns2 weasley.sample-test-ns1/test-1 x y/z > test_out.txt && |
| 43 | +grep "Ran 16 tests containing 52 assertions." test_out.txt && |
| 44 | + |
| 45 | +lein tests weasley.sample-test-ns2/test-1 > test_out.txt && |
| 46 | +grep "Ran 1 tests containing 4 assertions." test_out.txt && |
| 47 | +lein update-in :aliases empty -- test :only weasley.sample-test-ns2/test-1 > test_out.txt && |
| 48 | +grep "Ran 1 tests containing 4 assertions." test_out.txt && |
| 49 | + |
| 50 | +lein tests weasley.sample-test-ns2/test-1 weasley.sample-test-ns2/test-2 > test_out.txt && |
| 51 | +grep "Ran 2 tests containing 8 assertions." test_out.txt && |
| 52 | +lein update-in :aliases empty -- test :only weasley.sample-test-ns2/test-1 weasley.sample-test-ns2/test-2 > test_out.txt && |
| 53 | +grep "Ran 2 tests containing 8 assertions." test_out.txt && |
| 54 | + |
| 55 | +lein tests weasley.sample-test-ns2/test-1 weasley.sample-test-ns2 weasley.sample-test-ns2/test-2 weasley.sample-test-ns2/test-1 > test_out.txt && |
| 56 | +grep "Ran 15 tests containing 48 assertions." test_out.txt && |
| 57 | +lein update-in :aliases empty -- test :only weasley.sample-test-ns2/test-1 weasley.sample-test-ns2 weasley.sample-test-ns2/test-2 weasley.sample-test-ns2/test-1 > test_out.txt && |
| 58 | +grep "Ran 15 tests containing 48 assertions." test_out.txt && |
| 59 | + |
| 60 | +lein tests :select-vars weasley.sample-test-ns2 > test_out.txt && |
| 61 | +grep "Ran 1 tests containing 4 assertions." test_out.txt && |
| 62 | +lein update-in :aliases empty -- test :only weasley.sample-test-ns2/test-2 > test_out.txt && |
| 63 | +grep "Ran 1 tests containing 4 assertions." test_out.txt && |
| 64 | + |
| 65 | +lein tests :select-vars weasley.sample-test-ns1 > test_out.txt && |
| 66 | +grep "Ran 1 tests containing 4 assertions." test_out.txt && |
| 67 | +lein update-in :aliases empty -- test :only weasley.sample-test-ns1/test-2 > test_out.txt && |
| 68 | +grep "Ran 1 tests containing 4 assertions." test_out.txt && |
| 69 | + |
| 70 | +# The equivalent run for this in Leiningen does not work (test-ns-hook) |
| 71 | +lein tests :combination weasley.sample-test-ns2 > test_out.txt && |
| 72 | +grep "Ran 12 tests containing 36 assertions." test_out.txt && |
| 73 | + |
| 74 | +# The equivalent run for this in Leiningen does not work (test calling another test) |
| 75 | +lein tests :combination weasley.sample-test-ns2/test-4 weasley.sample-test-ns2/test-5 weasley.sample-test-ns2/test-1 > test_out.txt && |
| 76 | +grep "Ran 12 tests containing 36 assertions." test_out.txt && |
| 77 | + |
| 78 | +lein tests :combination weasley.sample-test-ns1 > test_out.txt && |
| 79 | +grep "Ran 0 tests containing 0 assertions." test_out.txt && |
| 80 | +lein update-in :aliases empty -- update-in : assoc :test-selectors '{:combination :combination}' -- test weasley.sample-test-ns1 :combination > test_out.txt && |
| 81 | +grep "Ran 0 tests containing 0 assertions." test_out.txt && |
| 82 | + |
| 83 | +# The equivalent run for this in Leiningen does not work (test calling another test) |
| 84 | +lein tests :combination weasley.sample-test-ns2/test-4 > test_out.txt && |
| 85 | +grep "Ran 4 tests containing 12 assertions." test_out.txt && |
| 86 | + |
| 87 | +# Global fixtures tests |
| 88 | +lein tests weasley.sample-test-ns3 > test_out.txt && |
| 89 | +grep "Ran 15 tests containing 48 assertions." test_out.txt && |
| 90 | + |
| 91 | +lein tests weasley.sample-test-ns3/test-1 > test_out.txt && |
| 92 | +grep "Ran 1 tests containing 4 assertions." test_out.txt && |
| 93 | + |
| 94 | +lein tests weasley.sample-test-ns3/test-1 weasley.sample-test-ns3/test-2 > test_out.txt && |
| 95 | +grep "Ran 2 tests containing 8 assertions." test_out.txt && |
| 96 | + |
| 97 | +lein tests :select-vars weasley.sample-test-ns3/test-1 weasley.sample-test-ns3/test-2 > test_out.txt && |
| 98 | +grep "Ran 1 tests containing 4 assertions." test_out.txt && |
| 99 | + |
| 100 | +lein tests :combination weasley.sample-test-ns3 > test_out.txt && |
| 101 | +grep "Ran 12 tests containing 36 assertions." test_out.txt && |
| 102 | + |
| 103 | +rm -f test_out.txt |
0 commit comments