23 lines · python
1## Check that lit will not overwrite existing result files when given2## --use-unique-output-file-name.3 4## Files are overwritten without the option.5# RUN: rm -f %t.xunit*.xml6# RUN: echo "test" > %t.xunit.xml7# RUN: not %{lit} --xunit-xml-output %t.xunit.xml %{inputs}/xunit-output8# RUN: FileCheck < %t.xunit.xml %s --check-prefix=NEW9# NEW: <?xml version="1.0" encoding="UTF-8"?>10# NEW-NEXT: <testsuites time="{{[0-9.]+}}">11## (other tests will check the contents of the whole file)12 13# RUN: rm -f %t.xunit*.xml14# RUN: echo "test" > %t.xunit.xml15## Files should not be overwritten with the option.16# RUN: not %{lit} --xunit-xml-output %t.xunit.xml --use-unique-output-file-name %{inputs}/xunit-output17# RUN: FileCheck < %t.xunit.xml %s --check-prefix=EXISTING18# EXISTING: test19## Results in a new file with some discriminator added.20# RUN: ls -l %t.xunit*.xml | wc -l | FileCheck %s --check-prefix=NUMFILES21# NUMFILES: 222# RUN: FileCheck < %t.xunit.*.xml %s --check-prefix=NEW23