HomePhabricator

[lit] Allow boolean expressions in REQUIRES and XFAIL and UNSUPPORTED

Description

[lit] Allow boolean expressions in REQUIRES and XFAIL and UNSUPPORTED

A lit condition line is now a comma-separated list of boolean expressions.
Comma-separated expressions act as if each expression were on its own
condition line:
For REQUIRES, if every expression is true then the test will run.
For UNSUPPORTED, if every expression is false then the test will run.
For XFAIL, if every expression is false then the test is expected to succeed.
As a special case "XFAIL: *" expects the test to fail.

Examples:

Test is expected fail on 64-bit Apple simulators and pass everywhere else

XFAIL: x86_64 && apple && !macosx

  1. Test is unsupported on Windows and on non-Ubuntu Linux
  2. and supported everywhere else

UNSUPPORTED: linux && !ubuntu, system-windows

Syntax:

  • '&&', '||', '!', '(', ')'. 'true' is true. 'false' is false.
  • Each test feature is a true identifier.
  • Substrings of the target triple are true identifiers for UNSUPPORTED and XFAIL, but not for REQUIRES. (This matches the current behavior.)
  • All other identifiers are false.
  • Identifiers are [-+=._a-zA-Z0-9]+

Differential Revision: https://reviews.llvm.org/D18185

Details

Committed
gparkerJan 24 2017, 12:45 AM
Differential Revision
D18185: [lit] Allow boolean expressions in REQUIRES and XFAIL and UNSUPPORTED
Parents
rL292895: Update domtree incrementally in loop peeling.
Branches
Unknown
Tags
Unknown