Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenIndiana: failing tests lib-dynlink-csharp #7686

Closed
vicuna opened this issue Dec 4, 2017 · 3 comments
Closed

OpenIndiana: failing tests lib-dynlink-csharp #7686

vicuna opened this issue Dec 4, 2017 · 3 comments

Comments

@vicuna
Copy link

vicuna commented Dec 4, 2017

Original bug ID: 7686
Reporter: grueni
Status: acknowledged (set by @xavierleroy on 2017-12-20T16:15:22Z)
Resolution: open
Priority: normal
Severity: minor
Platform: OpenIndiana
OS: OpenIndiana
OS Version: Hipster
Category: configure and build/install

Bug description

The tests should be skipped if not toolchain msvc (or csc) is used.
But the test is used and fails.
The test with which is not portable.
command -v can be used.

In OpenIndiana when csc is missing:
command -v csc => 1, which csc => 1

Additional information

--- ocaml-4.06.0/testsuite/tests/lib-dynlink-csharp/Makefile.orig 2017-12-04 16:55:54.081569859 +0000
+++ ocaml-4.06.0/testsuite/tests/lib-dynlink-csharp/Makefile  2017-12-04 16:56:51.089899537 +0000
@@ -40,7 +40,7 @@
 .PHONY: bytecode
 bytecode:
  @printf " ... testing 'bytecode':"
- @if ! $(SUPPORTS_SHARED_LIBRARIES) || ! which $(CSC_COMMAND) >/dev/null 2>&1; \
+ @if ! $(SUPPORTS_SHARED_LIBRARIES) || which $(CSC_COMMAND) >/dev/null 2>&1; \
  then \
    echo " => skipped"; \
  else \
@@ -55,7 +55,7 @@
 .PHONY: bytecode-dll
 bytecode-dll:
  @printf " ... testing 'bytecode-dll':"
- @if ! $(SUPPORTS_SHARED_LIBRARIES) || ! which $(CSC_COMMAND) > /dev/null 2>&1; \
+ @if ! $(SUPPORTS_SHARED_LIBRARIES) || which $(CSC_COMMAND) > /dev/null 2>&1; \
  then \
    echo " => skipped"; \
  else \
@@ -73,7 +73,7 @@
 native:
  @printf " ... testing 'native':"
  @if ! $(SUPPORTS_SHARED_LIBRARIES) || $(BYTECODE_ONLY) \
-     || ! which $(CSC_COMMAND) > /dev/null 2>&1; then \
+     ||  which $(CSC_COMMAND) > /dev/null 2>&1; then \
    echo " => skipped"; \
  else \
    rm -f main.exe main.dll; \
@@ -88,7 +88,7 @@
 native-dll:
  @printf " ... testing 'native-dll':"
  @if ! $(SUPPORTS_SHARED_LIBRARIES) || $(BYTECODE_ONLY) \
-     || ! which $(CSC_COMMAND) > /dev/null 2>&1; then \
+     ||  which $(CSC_COMMAND) > /dev/null 2>&1; then \
    echo " => skipped"; \
  else \
    rm -f main.exe main_obj.$(O) main.dll; \

File attachments

@vicuna
Copy link
Author

vicuna commented Dec 5, 2017

Comment author: grueni

The root cause is the return value of which when the argument is empty.
When TOOLCHAIN=cc CSC_COMMAND is empty.

The most simple test is as follows.

Linux:
[root@fnode1 ~]# which >/dev/null 2>&1; echo $?
255
[root@fnode1 ~]# command -v >/dev/null 2>&1; echo $?
0

Solaris/OpenIndiana
root@build1:./ocaml# which >/dev/null 2>&1; echo $?
0
root@build1:./ocaml# command -v >/dev/null 2>&1; echo $?
0

@vicuna
Copy link
Author

vicuna commented Dec 20, 2017

Comment author: @xavierleroy

OpenIndiana is not one of the "officially supported platforms" for OCaml, so the core development team is not going to maintain OpenIndiana support themselves. However, a patch for this test is welcome. Especially if it is submitted as a pull request on https://github.com/ocaml/ocaml/pulls

@xavierleroy
Copy link
Contributor

The test harness was completely rewritten in OCaml 4.07. As far as I can see, the test involving csc no longer uses which.

@xavierleroy xavierleroy added bug and removed bug labels Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants