Skip to content

Commit

Permalink
Issue #242 test update (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihai Budiu authored and ChrisDodd committed Feb 6, 2017
1 parent b92a90b commit faaaf85
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ until Ubuntu 16.10. For earlier releases of Ubuntu, you'll need to install from
source. You can find instructions
[here](https://github.com/google/protobuf/blob/master/src/README.md). Check out
the newest tag in the 3.0 series (`v3.0.2` as of this writing) before you build.

`git checkout v3.0.2`

Please note that while newer versions should work for p4c itself, you may run
into trouble with some extensions unless you install version 3.0, so you may
want to install from source even on newer releases of Ubuntu.
Expand Down
6 changes: 2 additions & 4 deletions backends/p4test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ p14_to_16tests.mk: $(GENTESTS) $(srcdir)/%reldir%/Makefile.am \
@$(GENTESTS) $(srcdir) p14_to_16 $(srcdir)/backends/p4test/run-p4-sample.py $^ >$@


# First one is issue #13
# Second one is issue #242
# This is issue #13
XFAIL_TESTS += \
p4/testdata/p4_16_samples/cast-call.p4.test \
p4/testdata/p4_16_samples/issue242.p4.test
p4/testdata/p4_16_samples/cast-call.p4.test
12 changes: 6 additions & 6 deletions testdata/p4_16_samples_outputs/issue242-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ control Eg(inout Headers hdrs, inout Metadata meta, inout standard_metadata_t st
tmp_2 = val.field1 != 32w0;
_pred = val.field1 != 32w0;
tmp_3 = (val.field1 != 32w0 ? 32w1 : tmp_3);
tmp_3 = (!(val.field1 != 32w0) ? 32w0 : (val.field1 != 32w0 ? 32w1 : tmp_3));
inc = (!(val.field1 != 32w0) ? 32w0 : (val.field1 != 32w0 ? 32w1 : tmp_3));
tmp_3 = (!(val.field1 != 32w0) ? 32w0 : tmp_3);
inc = tmp_3;
tmp_4 = (val.field1 != 32w0 ? 32w1 : tmp_4);
tmp_4 = (!(val.field1 != 32w0) ? 32w0 : (val.field1 != 32w0 ? 32w1 : tmp_4));
debug.write(32w0, (!(val.field1 != 32w0) ? 32w0 : (val.field1 != 32w0 ? 32w1 : tmp_4)));
debug.write(32w1, (!(val.field1 != 32w0) ? 32w0 : (val.field1 != 32w0 ? 32w1 : tmp_3)));
tmp_4 = (!(val.field1 != 32w0) ? 32w0 : tmp_4);
debug.write(32w0, tmp_4);
debug.write(32w1, tmp_3);
val.field1 = 32w1;
debug.write(32w2, inc);
debug.write(32w2, tmp_3);
reg.write(32w0, val.field1);
}
table tbl_test() {
Expand Down

0 comments on commit faaaf85

Please sign in to comment.