Exemplo n.º 1
0
 def test_blows_up_on_unhashable_args(self):
   with self.assertRaises(ValueError):
     SnapshottedProcessRequest(args=['1'])
   with self.assertRaises(ValueError):
     SnapshottedProcessRequest(args=('1',), snapshots=[])
   with self.assertRaises(ValueError):
     SnapshottedProcessRequest(args=('1',), directories_to_create=[])
Exemplo n.º 2
0
def java_sources_to_javac_args(sources_snapshot, out_dir):
  return SnapshottedProcessRequest(args=('-d', out_dir.path)+
                                        tuple(f.path for f in sources_snapshot.files),
                                   snapshots=(sources_snapshot,),
                                   directories_to_create=(out_dir.path,))
Exemplo n.º 3
0
def empty_process_request():
  return SnapshottedProcessRequest(args=tuple())
Exemplo n.º 4
0
def file_list_to_args_for_cat_with_snapshot_subjects_and_output_file(snapshot):
  return SnapshottedProcessRequest(args=tuple(sorted(f.path for f in snapshot.files)),
                                   snapshots=(snapshot,))
Exemplo n.º 5
0
def java_sources_to_javac_args(java_sources, out_dir):
  return SnapshottedProcessRequest(args=('-d', out_dir.path)+
                                        tuple(f.path for f in java_sources.dependencies),
                                   snapshot_subjects=(java_sources,),
                                   directories_to_create=(out_dir.path,))
Exemplo n.º 6
0
def file_list_to_args_for_cat_with_snapshot_subjects_and_output_file(files):
  return SnapshottedProcessRequest(args=tuple(sorted(f.path for f in files.dependencies)),
                                   snapshot_subjects=(files,))
Exemplo n.º 7
0
def file_list_to_args_for_cat(files):
  return SnapshottedProcessRequest(args=tuple(f.path for f in files.dependencies))