Swift is building from source, failing tests.

Hello! When running `utils/build-script --clean -t`, I'm able to complete
the build but it regularly fails the same 4/6 tests. Also, check-swift and
check-swift-validation are not found in the build directory alongside
Ninja-DebugAssert.
I've been working at this for a while, and I'm not sure where to look next.
Any ideas what could be going wrong?

Thanks!
Dylan

  Python 2.7.10
Installed with homebrew:
  ninja version 1.6.0
  cmake version 3.4.0

********** Output of `utils/build-script --clean -t` **********
build succeeded.
[646/646] Generating ../../../lib/swift/macosx/libswiftStdlibUnittest.dylib
--- Building tests for cmark ---
+ /usr/local/bin/cmake --build
/Users/dylan/Developer/Swift/build/Ninja-DebugAssert/cmark-macosx-x86_64 --
api_test
ninja: no work to do.
--- Running tests for cmark ---
--- test ---
+ cd
/Users/dylan/Developer/Swift/build/Ninja-DebugAssert/cmark-macosx-x86_64
+ /usr/local/Cellar/cmake/3.4.0/bin/ctest --force-new-ctest-process
Test project
/Users/dylan/Developer/Swift/build/Ninja-DebugAssert/cmark-macosx-x86_64
    Start 1: api_test
1/6 Test #1: api_test ......................... Passed 0.01 sec
    Start 2: html_normalization
2/6 Test #2: html_normalization ...............***Failed 0.09 sec
    Start 3: spectest_library
3/6 Test #3: spectest_library .................***Failed 0.06 sec
    Start 4: pathological_tests_library
4/6 Test #4: pathological_tests_library ....... Passed 0.87 sec
    Start 5: spectest_executable
5/6 Test #5: spectest_executable ..............***Failed 0.06 sec
    Start 6: smartpuncttest_executable
6/6 Test #6: smartpuncttest_executable ........***Failed 0.06 sec

33% tests passed, 4 tests failed out of 6

Total Test time (real) = 1.15 sec

The following tests FAILED:
  2 - html_normalization (Failed)
  3 - spectest_library (Failed)
  5 - spectest_executable (Failed)
  6 - smartpuncttest_executable (Failed)
Errors while running CTest
*** Failed while running tests for cmark (test)
utils/build-script: command terminated with a non-zero exit status 8,
aborting

You have a problem with Cmark, not swift. I think you probably have a configuration issue, or are missing some dev library. If you search the archives of swift-users, someone else had a cmark problem too, and the solution provided might help you.

I would also recommend ensuring you have installed all of the relevant dev tools as listed on the readme.

- mish

···

On Dec 11, 2015, at 11:12 AM, Dylan Brown via swift-users <swift-users@swift.org> wrote:

Hello! When running `utils/build-script --clean -t`, I'm able to complete the build but it regularly fails the same 4/6 tests. Also, check-swift and check-swift-validation are not found in the build directory alongside Ninja-DebugAssert.
I've been working at this for a while, and I'm not sure where to look next. Any ideas what could be going wrong?

Thanks!
Dylan

  Python 2.7.10
Installed with homebrew:
  ninja version 1.6.0
  cmake version 3.4.0

********** Output of `utils/build-script --clean -t` **********
build succeeded.
[646/646] Generating ../../../lib/swift/macosx/libswiftStdlibUnittest.dylib
--- Building tests for cmark ---
+ /usr/local/bin/cmake --build /Users/dylan/Developer/Swift/build/Ninja-DebugAssert/cmark-macosx-x86_64 -- api_test
ninja: no work to do.
--- Running tests for cmark ---
--- test ---
+ cd /Users/dylan/Developer/Swift/build/Ninja-DebugAssert/cmark-macosx-x86_64
+ /usr/local/Cellar/cmake/3.4.0/bin/ctest --force-new-ctest-process
Test project /Users/dylan/Developer/Swift/build/Ninja-DebugAssert/cmark-macosx-x86_64
    Start 1: api_test
1/6 Test #1: api_test ......................... Passed 0.01 sec
    Start 2: html_normalization
2/6 Test #2: html_normalization ...............***Failed 0.09 sec
    Start 3: spectest_library
3/6 Test #3: spectest_library .................***Failed 0.06 sec
    Start 4: pathological_tests_library
4/6 Test #4: pathological_tests_library ....... Passed 0.87 sec
    Start 5: spectest_executable
5/6 Test #5: spectest_executable ..............***Failed 0.06 sec
    Start 6: smartpuncttest_executable
6/6 Test #6: smartpuncttest_executable ........***Failed 0.06 sec

33% tests passed, 4 tests failed out of 6

Total Test time (real) = 1.15 sec

The following tests FAILED:
  2 - html_normalization (Failed)
  3 - spectest_library (Failed)
  5 - spectest_executable (Failed)
  6 - smartpuncttest_executable (Failed)
Errors while running CTest
*** Failed while running tests for cmark (test)
utils/build-script: command terminated with a non-zero exit status 8, aborting
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

You probably have Python 3.5 installed. Cmark tests are incompatible with
that revision.

Dmitri

···

On Fri, Dec 11, 2015 at 11:12 AM, Dylan Brown via swift-users < swift-users@swift.org> wrote:

Hello! When running `utils/build-script --clean -t`, I'm able to complete
the build but it regularly fails the same 4/6 tests. Also, check-swift and
check-swift-validation are not found in the build directory alongside
Ninja-DebugAssert.
I've been working at this for a while, and I'm not sure where to look
next. Any ideas what could be going wrong?

Thanks!
Dylan

  Python 2.7.10

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/

I was also experiencing the same issue. Have you looked at pull request #1 for
swift-cmark[0]? Pulling in the upstream cmark changes resolved the failures
for me.

[0]: Fix CMAKE_C_VISIBILITY_PRESET for cmake versions greater than 1.8 by hughbe · Pull Request #1 · apple/swift-cmark · GitHub

···

On 11 Dec 2015, at 20:12, Dylan Brown via swift-users <swift-users@swift.org> wrote:

Hello! When running `utils/build-script --clean -t`, I'm able to complete the build but it regularly fails the same 4/6 tests. Also, check-swift and check-swift-validation are not found in the build directory alongside Ninja-DebugAssert.
I've been working at this for a while, and I'm not sure where to look next. Any ideas what could be going wrong?

Thanks Alexander! I do have Python 3.5 installed via Anaconda on my Mac.
Merging in the upstream cmark changes as in pull #1 for swift-cmark seems
to have solved my issue.

All tests pass, and I get the final two lines:
-- check-swift-macosx-x86_64 finished --
--- Finished tests for swift ---

However, I still can't find check-swift in my build directory. Running
`find . -name '*check-swift*'` returns no results. Is there some flag
needed on the build-script to create these files?

···

On Sat, Dec 12, 2015 at 10:51 AM, Alexander Alemayhu <alexander@alemayhu.com > wrote:

> On 11 Dec 2015, at 20:12, Dylan Brown via swift-users < > swift-users@swift.org> wrote:
>
> Hello! When running `utils/build-script --clean -t`, I'm able to
complete the build but it regularly fails the same 4/6 tests. Also,
check-swift and check-swift-validation are not found in the build directory
alongside Ninja-DebugAssert.
> I've been working at this for a while, and I'm not sure where to look
next. Any ideas what could be going wrong?

I was also experiencing the same issue. Have you looked at pull request
#1 for
swift-cmark[0]? Pulling in the upstream cmark changes resolved the
failures
for me.

[0]: Fix CMAKE_C_VISIBILITY_PRESET for cmake versions greater than 1.8 by hughbe · Pull Request #1 · apple/swift-cmark · GitHub

Answering my own question: I believe the `check-swift` tools for running
tests independently of the utils/build-script are not yet implemented.
Please correct me if I'm wrong, otherwise thread closed. Thanks!
-Dylan

···

On Sat, Dec 12, 2015 at 12:22 PM, Dylan Brown <djwbrown@gmail.com> wrote:

Thanks Alexander! I do have Python 3.5 installed via Anaconda on my Mac.
Merging in the upstream cmark changes as in pull #1 for swift-cmark seems
to have solved my issue.
Fix CMAKE_C_VISIBILITY_PRESET for cmake versions greater than 1.8 by hughbe · Pull Request #1 · apple/swift-cmark · GitHub
GitHub - commonmark/cmark: CommonMark parsing and rendering library and program in C

All tests pass, and I get the final two lines:
-- check-swift-macosx-x86_64 finished --
--- Finished tests for swift ---

However, I still can't find check-swift in my build directory. Running
`find . -name '*check-swift*'` returns no results. Is there some flag
needed on the build-script to create these files?

On Sat, Dec 12, 2015 at 10:51 AM, Alexander Alemayhu < > alexander@alemayhu.com> wrote:

> On 11 Dec 2015, at 20:12, Dylan Brown via swift-users < >> swift-users@swift.org> wrote:
>
> Hello! When running `utils/build-script --clean -t`, I'm able to
complete the build but it regularly fails the same 4/6 tests. Also,
check-swift and check-swift-validation are not found in the build directory
alongside Ninja-DebugAssert.
> I've been working at this for a while, and I'm not sure where to look
next. Any ideas what could be going wrong?

I was also experiencing the same issue. Have you looked at pull request
#1 for
swift-cmark[0]? Pulling in the upstream cmark changes resolved the
failures
for me.

[0]: Fix CMAKE_C_VISIBILITY_PRESET for cmake versions greater than 1.8 by hughbe · Pull Request #1 · apple/swift-cmark · GitHub

cd build/Ninja-ReleaseAssert/swift-linux-x86_64
ninja check-swift

Dmitri

···

On Sat, Dec 12, 2015 at 6:57 AM, Dylan Brown via swift-users < swift-users@swift.org> wrote:

Answering my own question: I believe the `check-swift` tools for running
tests independently of the utils/build-script are not yet implemented.
Please correct me if I'm wrong, otherwise thread closed. Thanks!

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/

Thanks for the guidance, I hadn't used Ninja for building before.
-Dylan

···

On Sun, Dec 13, 2015 at 12:59 AM, Dmitri Gribenko <gribozavr@gmail.com> wrote:

On Sat, Dec 12, 2015 at 6:57 AM, Dylan Brown via swift-users < > swift-users@swift.org> wrote:

Answering my own question: I believe the `check-swift` tools for running
tests independently of the utils/build-script are not yet implemented.
Please correct me if I'm wrong, otherwise thread closed. Thanks!

cd build/Ninja-ReleaseAssert/swift-linux-x86_64
ninja check-swift

Dmitri

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/