Ver Fonte

Fix regressions caught by travisci

George S. Baugh há 8 anos atrás
pai
commit
eaf87f89fd
3 ficheiros alterados com 6 adições e 4 exclusões
  1. 3 2
      .travis.yml
  2. 2 1
      lib/TestRail/Utils/Find.pm
  3. 1 1
      t/TestRail-Utils-Lock.t

+ 3 - 2
.travis.yml

@@ -1,5 +1,6 @@
 language: perl
 perl:
+   - '5.22'
    - '5.20'
    - '5.18'
    - '5.16'
@@ -10,7 +11,7 @@ perl:
 matrix:
    fast_finish: true
    include:
-     - perl: '5.22'
+     - perl: '5.24'
        env: COVERAGE=1
 
 sudo: false
@@ -26,7 +27,7 @@ install:
   - cpan-install --deps       # installs prereqs, including recommends
   - cpan-install --coverage   # installs converage prereqs, if enabled
   - cpanm --quiet --notest Devel::Cover::Report::Coveralls #Make sure to shoot it over to coveralls
-  - cpanm --quiet --notest Test::Spelling Test::NoTabs Test::EOL Test::Version Test::Mojibake #Looks like they were missed by haarg's stuff
+  - cpanm --quiet --notest Test::Perl::Critic Test::Synopsis Test::Spelling Test::NoTabs Test::EOL Test::Version Test::Mojibake #Looks like they were missed by haarg's stuff
 
 branches:
    only:

+ 2 - 1
lib/TestRail/Utils/Find.pm

@@ -223,8 +223,9 @@ sub findTests {
         }
         foreach my $case (@cases) {
             foreach my $path (@realtests) {
-                #XXX Not quite as accurate as simply comparing the title to the basename of the path, but much faster
+                #Filter obviously bogus stuff first to not incur basename() cost except for when we're right, or have a name that contains this name
                 next unless index($path,$case->{'title'}) > 0;
+                next unless basename($path) eq $case->{title};
                 $case->{'path'} = $path;
                 push(@tmpArr, $case);
                 last;

+ 1 - 1
t/TestRail-Utils-Lock.t

@@ -20,7 +20,7 @@ my $opts = {
     'run'        => 'lockRun',
     'case-types' => ['Automated'],
     'lockname'   => 'locked',
-    'match'      => 't',
+    'match'      => "t",
     'no-recurse' => 1,
     'hostname'   => hostname(),
     'mock'       => 1