Skip to content

Commit

Permalink
[LLD] Restore tests that use "-" as output
Browse files Browse the repository at this point in the history
No longer require workarounds for output to "-" (stdout) for
Windows. These workarounds were just hiding the actual problem which has
been fixed in r357058.

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

llvm-svn: 357072
  • Loading branch information
nga888 committed Mar 27, 2019
1 parent 88efba8 commit e6b6ab2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 38 deletions.
5 changes: 1 addition & 4 deletions lld/test/ELF/stdout.s
Expand Up @@ -8,10 +8,7 @@
# CHECK: 201000: 90 nop

# RUN: ld.lld %t.o -o %t2

# FIXME: Add "RUN" in front of this line once the test passes on Windows
# with it.
# diff %t1 %t2
# RUN: diff %t1 %t2

.globl _start
_start:
Expand Down
6 changes: 2 additions & 4 deletions lld/test/wasm/target-feature-disallowed.yaml
Expand Up @@ -7,12 +7,10 @@
# RUN: obj2yaml %t.unspecified.wasm | FileCheck %s --check-prefix UNSPECIFIED

# RUN: yaml2obj %S/Inputs/disallow-feature-foo.yaml -o %t.disallowed.o
# RUN: wasm-ld --no-entry -o %t.disallowed.wasm %t1.o %t.disallowed.o
# RUN: obj2yaml %t.disallowed.wasm | FileCheck %s --check-prefix DISALLOWED
# RUN: wasm-ld --no-entry -o - %t1.o %t.disallowed.o | obj2yaml | FileCheck %s --check-prefix DISALLOWED

# RUN: yaml2obj %S/Inputs/no-feature-foo.yaml -o %t.none.o
# RUN: wasm-ld --no-entry -o %t.none.wasm %t1.o %t.none.o
# RUN: obj2yaml %t.none.wasm | FileCheck %s --check-prefix NONE
# RUN: wasm-ld --no-entry -o - %t1.o %t.none.o | obj2yaml | FileCheck %s --check-prefix NONE

# Check that the following combinations of feature linkage policies
# give the expected results:
Expand Down
9 changes: 3 additions & 6 deletions lld/test/wasm/target-feature-none.yaml
@@ -1,13 +1,10 @@
# RUN: yaml2obj %s -o %t1.o

# RUN: wasm-ld --no-entry -o %t.empty.wasm %t1.o
# RUN: obj2yaml %t.empty.wasm | FileCheck %s --check-prefix EMPTY
# RUN: wasm-ld --no-entry -o - %t1.o | obj2yaml | FileCheck %s --check-prefix EMPTY

# RUN: wasm-ld --no-entry --features= -o %t.empty.2.wasm %t1.o
# RUN: obj2yaml %t.empty.2.wasm | FileCheck %s --check-prefix EMPTY
# RUN: wasm-ld --no-entry --features= -o - %t1.o | obj2yaml | FileCheck %s --check-prefix EMPTY

# RUN: wasm-ld --no-entry --features=foo,bar,baz -o %t.specified.wasm %t1.o
# RUN: obj2yaml %t.specified.wasm | FileCheck %s --check-prefix SPECIFIED
# RUN: wasm-ld --no-entry --features=foo,bar,baz -o - %t1.o | obj2yaml | FileCheck %s --check-prefix SPECIFIED

--- !WASM
FileHeader:
Expand Down
17 changes: 6 additions & 11 deletions lld/test/wasm/target-feature-required.yaml
@@ -1,28 +1,23 @@
# RUN: yaml2obj %s -o %t1.o

# RUN: wasm-ld --no-entry --features=foo,bar,baz -o %t.specified.wasm %t1.o
# RUN: obj2yaml %t.specified.wasm | FileCheck %s --check-prefix SPECIFIED
# RUN: wasm-ld --no-entry --features=foo,bar,baz -o - %t1.o | obj2yaml | FileCheck %s --check-prefix SPECIFIED

# RUN: not wasm-ld --no-entry --features=bar,baz,quux -o - %t1.o 2>&1 | FileCheck %s --check-prefix UNSPECIFIED
# RUN: not wasm-ld --no-entry --features=bar,baz,quux -o /dev/null %t1.o 2>&1 | FileCheck %s --check-prefix UNSPECIFIED

# RUN: wasm-ld --no-entry --no-check-features --features=bar,baz,quux -o %t.unspecified.wasm %t1.o
# RUN: obj2yaml %t.unspecified.wasm | FileCheck %s --check-prefix UNSPECIFIED-NOCHECK
# RUN: wasm-ld --no-entry --no-check-features --features=bar,baz,quux -o - %t1.o | obj2yaml | FileCheck %s --check-prefix UNSPECIFIED-NOCHECK

# RUN: yaml2obj %S/Inputs/require-feature-foo.yaml -o %t.required.o
# RUN: wasm-ld --no-entry -o %t.required.wasm %t1.o %t.required.o
# RUN: obj2yaml %t.required.wasm | FileCheck %s --check-prefix REQUIRED
# RUN: wasm-ld --no-entry -o - %t1.o %t.required.o | obj2yaml | FileCheck %s --check-prefix REQUIRED

# RUN: yaml2obj %S/Inputs/disallow-feature-foo.yaml -o %t.disallowed.o
# RUN: not wasm-ld --no-entry -o /dev/null %t1.o %t.disallowed.o 2>&1 | FileCheck %s --check-prefix DISALLOWED

# RUN: wasm-ld --no-entry --no-check-features -o %t.disallowed.wasm %t1.o %t.disallowed.o
# RUN: obj2yaml %t.disallowed.wasm | FileCheck %s --check-prefix DISALLOWED-NOCHECK
# RUN: wasm-ld --no-entry --no-check-features -o - %t1.o %t.disallowed.o | obj2yaml | FileCheck %s --check-prefix DISALLOWED-NOCHECK

# RUN: yaml2obj %S/Inputs/no-feature-foo.yaml -o %t.none.o
# RUN: not wasm-ld --no-entry -o /dev/null %t1.o %t.none.o 2>&1 | FileCheck %s --check-prefix NONE

# RUN: wasm-ld --no-entry --no-check-features -o %t.none.wasm %t1.o %t.none.o
# RUN: obj2yaml %t.none.wasm | FileCheck %s --check-prefix NONE-NOCHECK
# RUN: wasm-ld --no-entry --no-check-features -o - %t1.o %t.none.o | obj2yaml | FileCheck %s --check-prefix NONE-NOCHECK

# Check that the following combinations of feature linkage policies
# give the expected results:
Expand Down
20 changes: 7 additions & 13 deletions lld/test/wasm/target-feature-used.yaml
@@ -1,30 +1,24 @@
# RUN: yaml2obj %s -o %t1.o

# RUN: wasm-ld --no-entry --features=foo,bar,baz -o %t.specified.wasm %t1.o
# RUN: obj2yaml %t.specified.wasm | FileCheck %s --check-prefix SPECIFIED
# RUN: wasm-ld --no-entry --features=foo,bar,baz -o - %t1.o | obj2yaml | FileCheck %s --check-prefix SPECIFIED

# RUN: not wasm-ld --no-entry --features=bar,baz,quux -o - %t1.o 2>&1 | FileCheck %s --check-prefix UNSPECIFIED
# RUN: not wasm-ld --no-entry --features=bar,baz,quux -o /dev/null %t1.o 2>&1 | FileCheck %s --check-prefix UNSPECIFIED

# RUN: wasm-ld --no-entry --no-check-features --features=bar,baz,quux -o %t.unspecified.wasm %t1.o
# RUN: obj2yaml %t.unspecified.wasm| FileCheck %s --check-prefix UNSPECIFIED-NOCHECK
# RUN: wasm-ld --no-entry --no-check-features --features=bar,baz,quux -o - %t1.o | obj2yaml | FileCheck %s --check-prefix UNSPECIFIED-NOCHECK

# RUN: yaml2obj %S/Inputs/use-feature-foo.yaml -o %t.used.o
# RUN: wasm-ld --no-entry -o %t.used.wasm %t1.o %t.used.o
# RUN: obj2yaml %t.used.wasm | FileCheck %s --check-prefix USED
# RUN: wasm-ld --no-entry -o - %t1.o %t.used.o | obj2yaml | FileCheck %s --check-prefix USED

# RUN: yaml2obj %S/Inputs/require-feature-foo.yaml -o %t.required.o
# RUN: wasm-ld --no-entry -o %t.required.wasm %t1.o %t.required.o
# RUN: obj2yaml %t.required.wasm | FileCheck %s --check-prefix REQUIRED
# RUN: wasm-ld --no-entry -o - %t1.o %t.required.o | obj2yaml | FileCheck %s --check-prefix REQUIRED

# RUN: yaml2obj %S/Inputs/disallow-feature-foo.yaml -o %t.disallowed.o
# RUN: not wasm-ld --no-entry -o /dev/null %t1.o %t.disallowed.o 2>&1 | FileCheck %s --check-prefix DISALLOWED

# RUN: wasm-ld --no-entry --no-check-features -o %t.disallowed.wasm %t1.o %t.disallowed.o
# RUN: obj2yaml %t.disallowed.wasm | FileCheck %s --check-prefix DISALLOWED-NOCHECK
# RUN: wasm-ld --no-entry --no-check-features -o - %t1.o %t.disallowed.o | obj2yaml | FileCheck %s --check-prefix DISALLOWED-NOCHECK

# RUN: yaml2obj %S/Inputs/no-feature-foo.yaml -o %t.none.o
# RUN: wasm-ld --no-entry -o %t.none.wasm %t1.o %t.none.o
# RUN: obj2yaml %t.none.wasm | FileCheck %s --check-prefix NONE
# RUN: wasm-ld --no-entry -o - %t1.o %t.none.o | obj2yaml | FileCheck %s --check-prefix NONE

# Check that the following combinations of feature linkage policies
# give the expected results:
Expand Down

0 comments on commit e6b6ab2

Please sign in to comment.