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>
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/
# This module is implicitly imported by every module.
module core
-import posix
import environ
import time
import file
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
--- /dev/null
+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`.
# 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
# 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
[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
# 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
# Services conforming to POSIX
module posix
-import text
-
in "C Header" `{
#include <sys/types.h>
#include <unistd.h>
return ret;
`}
end
-
-redef class Int
- # Does the file descriptor `self` refer to a terminal?
- fun isatty: Bool `{ return isatty(self); `}
-end
module privileges
import opts
+import posix
redef class Text
# Does the operating system know the user named `self`?
hello_cocoa
hello_ios
test_platform_ios
+test_platform_android
mpi
emscripten
neo_doxygen
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
# 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