Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007686OCamlconfigure and build/installpublic2017-12-04 19:422017-12-05 08:44
Reportergrueni 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOpenIndianaOSOpenIndianaOS VersionHipster
Product Version 
Target VersionFixed in Version 
Summary0007686: OpenIndiana: failing tests lib-dynlink-csharp
DescriptionThe 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; \
TagsNo tags attached.
Attached Filespatch file icon a.patch [^] (1,472 bytes) 2017-12-05 08:41 [Show Content]

- Relationships

-  Notes
(0018731)
grueni (reporter)
2017-12-05 08:44

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

- Issue History
Date Modified Username Field Change
2017-12-04 19:42 grueni New Issue
2017-12-04 19:54 octachron Summary Failing tests lib-dynlink-csharp => OpenIndiana: failing tests lib-dynlink-csharp
2017-12-05 08:41 grueni File Added: a.patch
2017-12-05 08:44 grueni Note Added: 0018731


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker