Beispiel #1
0
    def find_tests_impl(self, local_folder, manifest):
        folder = os.path.join(self.tests_path, local_folder)
        manifest_path = os.path.join(folder, 'manifest.ini')
        if os.path.exists(manifest_path):
            manifest = testutil.parse_manifest(manifest_path, local_folder,
                                               manifest)
            if manifest_get(manifest, 'folder', 'skip') == 'true':
                return

        for name in os.listdir(folder):
            local_path = os.path.join(local_folder, name)
            path = os.path.join(self.tests_path, local_path)
            if os.path.isdir(path):
                self.find_tests_impl(local_path, manifest)
            elif path.endswith('.sp'):
                if self.args.test is not None and not local_path.startswith(
                        self.args.test):
                    continue

                test = Test(**{
                    'path': os.path.abspath(path),
                    'manifest': manifest,
                })
                if manifest_get(manifest, test.name, 'skip') == 'true':
                    continue
                self.tests.append(test)
Beispiel #2
0
 def should_run(self, mode):
     compiler = self.local_manifest_.get('compiler', None)
     if compiler is None:
         compiler = manifest_get(self.manifest_, self.name, 'compiler')
     if compiler is None:
         return True
     return mode['spcomp']['name'] == compiler
Beispiel #3
0
 def should_run(self, mode):
   compiler = self.local_manifest_.get('compiler', None)
   if compiler is None:
     compiler = manifest_get(self.manifest_, self.name, 'compiler')
   if compiler is None:
     return True
   return mode['spcomp']['name'] == compiler
Beispiel #4
0
  def find_tests_impl(self, local_folder, manifest):
    folder = os.path.join(self.tests_path, local_folder)
    manifest_path = os.path.join(folder, 'manifest.ini')
    if os.path.exists(manifest_path):
      manifest = testutil.parse_manifest(manifest_path, local_folder, manifest)
      if manifest_get(manifest, 'folder', 'skip') == 'true':
        return

    for name in os.listdir(folder):
      local_path = os.path.join(local_folder, name)
      path = os.path.join(self.tests_path, local_path)
      if os.path.isdir(path):
        self.find_tests_impl(local_path, manifest)
      elif path.endswith('.sp'):
        if self.args.test is not None and not local_path.startswith(self.args.test):
          continue

        test = Test(**{
          'path': os.path.abspath(path),
          'manifest': manifest,
        })
        if manifest_get(manifest, test.name, 'skip') == 'true':
          continue
        self.tests.append(test)
Beispiel #5
0
 def includes(self):
     return manifest_get(self.manifest_, self.name, 'includes', [])
Beispiel #6
0
 def type(self):
     return manifest_get(self.manifest_, self.name, 'type', 'runtime')
Beispiel #7
0
 def checkManifests(self, key, default=None):
     return self.local_manifest_.get(key) or manifest_get(
         self.manifest_, self.name, key, default)
Beispiel #8
0
 def includes(self):
   return manifest_get(self.manifest_, self.name, 'includes', [])
Beispiel #9
0
 def type(self):
   return manifest_get(self.manifest_, self.name, 'type', 'runtime')