Merge: Windows: fix bootstrap
authorJean Privat <jean@pryen.org>
Wed, 20 Jun 2018 18:59:15 +0000 (14:59 -0400)
committerJean Privat <jean@pryen.org>
Wed, 20 Jun 2018 18:59:15 +0000 (14:59 -0400)
It looks like the use of the method `is_tty` in Nit tools triggered the FFI compilation of the `posix` module which fails on Windows. This module imports some headers that are unavailable in the msys2 environment, as used by our test servers.

Pull-Request: #2711
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

.gitignore
lib/core/core.nit
lib/core/file.nit
lib/posix/README.md [new file with mode: 0644]
lib/posix/ext.nit [moved from lib/posix_ext/posix_ext.nit with 91% similarity]
lib/posix/package.ini [moved from lib/posix_ext/package.ini with 55% similarity]
lib/posix/posix.nit [moved from lib/core/posix.nit with 94% similarity]
lib/privileges/privileges.nit
tests/MINGW64_NT.skip
tests/testall.sh

index c4cb96e..1463ddf 100644 (file)
@@ -31,10 +31,12 @@ src/*.dat
 src/*.gnu
 src/*.bin
 src/nitc_0
+src/nitc_0.exe
 
 c_src/*.o
 c_src/*.cksum
 c_src/nitc
+c_src/nitc.exe
 
 csrc2/
 
index 54f2550..5261077 100644 (file)
@@ -15,7 +15,6 @@
 # This module is implicitly imported by every module.
 module core
 
-import posix
 import environ
 import time
 import file
index fa50549..ed4c6c8 100644 (file)
@@ -306,6 +306,9 @@ redef class Int
        private fun fd_to_stream(mode: CString): NativeFile `{
                return fdopen((int)self, mode);
        `}
+
+       # Does the file descriptor `self` refer to a terminal?
+       fun isatty: Bool `{ return isatty(self); `}
 end
 
 # Constant for read-only file streams
diff --git a/lib/posix/README.md b/lib/posix/README.md
new file mode 100644 (file)
index 0000000..3b73f9c
--- /dev/null
@@ -0,0 +1,5 @@
+Services conforming to POSIX
+
+The core module `posix` includes POSIX services available on all POSIX compliant systems.
+For services provided by some implementations of POSIX but absent from any POSIX version,
+import `posix::ext`.
similarity index 91%
rename from lib/posix_ext/posix_ext.nit
rename to lib/posix/ext.nit
index 8dd83c3..85da40a 100644 (file)
@@ -1,7 +1,5 @@
 # This file is part of NIT ( http://www.nitlanguage.org ).
 #
-# Copyright 2014 Alexis Laferrière <alexis.laf@xymus.net>
-#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -15,7 +13,9 @@
 # limitations under the License.
 
 # Services not defined in POSIX but provided by most implementations
-module posix_ext
+module ext
+
+import posix
 
 redef extern class Passwd
        # User information
similarity index 55%
rename from lib/posix_ext/package.ini
rename to lib/posix/package.ini
index 6b78527..79c6ca1 100644 (file)
@@ -1,12 +1,12 @@
 [package]
-name=posix_ext
+name=posix
 tags=wrapper,lib
 maintainer=Alexis Laferrière <alexis.laf@xymus.net>
 license=Apache-2.0
-desc=Services not defined in POSIX but provided by most implementations
+desc=Services conforming to POSIX
 [upstream]
-browse=https://github.com/nitlang/nit/tree/master/lib/posix_ext/
+browse=https://github.com/nitlang/nit/tree/master/lib/posix/
 git=https://github.com/nitlang/nit.git
-git.directory=lib/posix_ext/
+git.directory=lib/posix/
 homepage=http://nitlanguage.org
 issues=https://github.com/nitlang/nit/issues
similarity index 94%
rename from lib/core/posix.nit
rename to lib/posix/posix.nit
index 587e606..03a8a2e 100644 (file)
@@ -1,7 +1,5 @@
 # This file is part of NIT ( http://www.nitlanguage.org ).
 #
-# Copyright 2013 Alexis Laferrière <alexis.laf@xymus.net>
-#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -17,8 +15,6 @@
 # Services conforming to POSIX
 module posix
 
-import text
-
 in "C Header" `{
 #include <sys/types.h>
 #include <unistd.h>
@@ -111,8 +107,3 @@ extern class Group `{struct group*`}
                return ret;
        `}
 end
-
-redef class Int
-       # Does the file descriptor `self` refer to a terminal?
-       fun isatty: Bool `{ return isatty(self); `}
-end
index f17a28e..c3a9466 100644 (file)
@@ -21,6 +21,7 @@
 module privileges
 
 import opts
+import posix
 
 redef class Text
        # Does the operating system know the user named `self`?
index e08c0ad..7b99224 100644 (file)
@@ -3,6 +3,7 @@ cocoa_message_box
 hello_cocoa
 hello_ios
 test_platform_ios
+test_platform_android
 mpi
 emscripten
 neo_doxygen
@@ -10,3 +11,69 @@ neo4j
 mongo
 pernicious_numbers
 frankuchredux
+base_autocast
+base_covar_int_alt5
+base_div_by_zero
+shootout_mandelbrot_args1
+test_binary
+test_curl
+test_ffi_java
+test_ffi_objc_types_and_callbacks
+test_fix_int
+test_glsl_validation
+test_json_static
+test_jvm
+test_kill_process
+test_msgpack_deserialization
+test_nitcorn
+test_path_args1
+test_postgres
+test_read_all_args1
+test_regex_check
+test_signals
+test_stream_poll
+nitc
+nitls_args3
+nitmetrics_args3
+nitpm_args
+nitsmells_args
+nitunit_args
+nitvm
+nitweb
+test_highlight_args1
+test_neo
+test_loader_args2
+test_loader_args5
+montecarlo
+catalan_numbers
+count_the_coins
+fibonacci_word
+first_letter_last_letter
+curl_http
+nlp_index
+drop_privileges
+concurrent_array_and_barrier
+jointask_example
+socket_client
+socket_server
+socket_simple_server
+fannkuchredux
+mandelbrot
+thread_ring
+htcpcp_server
+simple_file_server
+test_restful_annot
+nitin
+nitiwiki_args1
+nitiwiki_args2
+test_annot_pkgconfig_alt
+test_gtk
+nitlight_as_a_service
+curl_rest
+lang_annot
+opengles2_hello_triangle
+nlp_server
+ui_test
+restful_annot
+langannot
+simple_simulation
index 61b00e9..7740b5f 100755 (executable)
 # limitations under the License.
 
 # Run some tests on each engine
-for x in nitcg nitcs nitcsg nitce niti nitvm; do
+
+engine=(nitcg nitcg nitcs nitcsg nitce niti nitvm)
+if uname | grep MINGW64 1>/dev/null 2>&1; then
+       engine=(nitcg nitcg nitcs nitcsg nitce)
+fi
+
+for x in "${engine[@]}"; do
        echo "--engine $x"
        ./tests.sh --engine $x "$@"
 done