Skip to content
This repository was archived by the owner on Sep 2, 2018. It is now read-only.

Enable tests on travis-ci #42

Closed
dylanmckay opened this issue Feb 21, 2015 · 6 comments
Closed

Enable tests on travis-ci #42

dylanmckay opened this issue Feb 21, 2015 · 6 comments

Comments

@dylanmckay
Copy link
Member

Currently, most of our tests fail. this is because I wrote tests for every existing AVR instruction, including the ones that are not implemented. It is also because we have some encoding errors in several instructions.

Once we are in a passing state, get travis to run our tests in the build process.

@RandomInsano
Copy link

Travis should run any tests that would be checked by running 'make test' after the build succeeds.

How are the tests done? We can likely define our own build + test commands by adding something like this:

script:
  - ./configure
  - make
  - ./test-app

@dylanmckay
Copy link
Member Author

Tests are executed using make check.

dylanmckay pushed a commit that referenced this issue Mar 28, 2015
If we couldn't analyze its terminator (i.e., it's an indirectbr, or some
other weirdness), we can't safely re-if-convert a predicated block,
because we can't tell whether the predicated terminator can
fallthrough (it does).

Currently, we would completely ignore the fallthrough successor. In
the added testcase, this means we used to generate:

    ...
  @ %entry:
    cmp   r5, #21
    ittt  ne
  @ %cc1f:
    cmpne r7, #42
  @ %cc2t:
    strne.w       r5, [r8]
    movne pc, r10
  @ %cc1t:
    ...

Whereas the successor of %cc1f was originally %bb1.
With the fix, we get the correct:

    ...
  @ %entry:
    cmp   r5, #21
    itt   eq
  @ %cc1t:
    streq.w       r5, [r11]
    moveq pc, r0
  @ %cc1f:
    cmp   r7, #42
    itt   ne
  @ %cc2t:
    strne.w       r5, [r8]
    movne pc, r10
  @ %bb1:
    ...

rdar://20192768
Differential Revision: http://reviews.llvm.org/D8509


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232872 91177308-0d34-0410-b5e6-96231b3b80d8
@dylanmckay
Copy link
Member Author

I have got the AVR MC test suite to the point where there are only two issues left:

I will mark them as XFAIL so that they are expected to fail. Our test suite should then pass, and we can fix the aforementioned tests and remove the XFAIL annotation.

@RandomInsano
Copy link

Noted! On my way home for dinner, will make the change tonight.

@dylanmckay
Copy link
Member Author

Note that make check will attempt to run all tests (including x86,ARM,etc).

We pass -DLLVM_TARGETS_TO_BUILD="AVR" to CMake in .travis.yml, and so the tests will fail with make check (because "x86 is an unknown target").

We probably have to run the AVR tests manually. Because all AVR tests are parented by folders named AVR, it would be sufficient to call:

# run the LLVM testing tool (lit) on all files of type d (directory) with name "AVR"
llvm-lit $(find <llvm-root>/test -name AVR -type d)

@RandomInsano
Copy link

Yup, looks good over here. Even if make check failed due to missing targets, it makes sense to only test the AVR components.

I'll fold the tests in now and see how she goes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants