lit-opts.py 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. # Check cases where LIT_OPTS has no effect.
  2. #
  3. # RUN: %{lit} -j 1 -s %{inputs}/lit-opts | FileCheck %s
  4. # RUN: env LIT_OPTS= %{lit} -j 1 -s %{inputs}/lit-opts | FileCheck %s
  5. # RUN: env LIT_OPTS=-s %{lit} -j 1 -s %{inputs}/lit-opts | FileCheck %s
  6. # Check that LIT_OPTS can override command-line options.
  7. #
  8. # RUN: env LIT_OPTS=-a \
  9. # RUN: %{lit} -j 1 -s %{inputs}/lit-opts \
  10. # RUN: | FileCheck -check-prefix=SHOW-ALL -DVAR= %s
  11. # Check that LIT_OPTS understands multiple options with arbitrary spacing.
  12. #
  13. # RUN: env LIT_OPTS='-a -v -Dvar=foobar' \
  14. # RUN: %{lit} -j 1 -s %{inputs}/lit-opts \
  15. # RUN: | FileCheck -check-prefix=SHOW-ALL -DVAR=foobar %s
  16. # Check that LIT_OPTS parses shell-like quotes and escapes.
  17. #
  18. # RUN: env LIT_OPTS='-a -v -Dvar="foo bar"\ baz' \
  19. # RUN: %{lit} -j 1 -s %{inputs}/lit-opts \
  20. # RUN: | FileCheck -check-prefix=SHOW-ALL -DVAR="foo bar baz" %s
  21. # CHECK: Testing: 1 tests
  22. # CHECK-NOT: PASS
  23. # CHECK: Expected Passes : 1
  24. # SHOW-ALL: Testing: 1 tests
  25. # SHOW-ALL: PASS: lit-opts :: test.txt (1 of 1)
  26. # SHOW-ALL: {{^}}[[VAR]]
  27. # SHOW-ALL-NOT: PASS
  28. # SHOW-ALL: Expected Passes : 1