Skip to content
Permalink
Browse files

Transition package name to ounit2/ounit2-lwt to avoid name clash with…

… oUnit on case insensitive systems.
  • Loading branch information...
gildor478 committed Sep 25, 2019
1 parent c975515 commit 53b9d1a4dd3923b2661d505bf35355b363b8dbd3
Showing with 135 additions and 66 deletions.
  1. +25 −10 .travis.yml
  2. +4 −3 Makefile
  3. +12 −0 README.md
  4. +2 −0 appveyor.yml
  5. +1 −1 examples/dune
  6. +7 −10 ounit-lwt.opam
  7. +2 −10 ounit.opam
  8. +22 −0 ounit2-lwt.opam
  9. +26 −0 ounit2.opam
  10. +13 −0 src/lib/oUnit/META
  11. +2 −0 src/lib/ounit-lwt/META
  12. +0 −4 src/lib/ounit-lwt/dune
  13. +0 −13 src/lib/ounit-old/META
  14. +4 −0 src/lib/ounit2-lwt/dune
  15. 0 src/lib/{ounit-lwt → ounit2-lwt}/oUnitLwt.ml
  16. +1 −1 src/lib/{ounit → ounit2}/advanced/dune
  17. 0 src/lib/{ounit → ounit2}/advanced/oUnit.css
  18. 0 src/lib/{ounit → ounit2}/advanced/oUnit.js
  19. 0 src/lib/{ounit → ounit2}/advanced/oUnitAssert.ml
  20. 0 src/lib/{ounit → ounit2}/advanced/oUnitBracket.ml
  21. 0 src/lib/{ounit → ounit2}/advanced/oUnitCache.ml
  22. 0 src/lib/{ounit → ounit2}/advanced/oUnitCheckEnv.ml
  23. 0 src/lib/{ounit → ounit2}/advanced/oUnitChooser.ml
  24. 0 src/lib/{ounit → ounit2}/advanced/oUnitConf.ml
  25. 0 src/lib/{ounit → ounit2}/advanced/oUnitCore.ml
  26. 0 src/lib/{ounit → ounit2}/advanced/oUnitDiff.ml
  27. 0 src/lib/{ounit → ounit2}/advanced/oUnitDiff.mli
  28. 0 src/lib/{ounit → ounit2}/advanced/oUnitLogger.ml
  29. 0 src/lib/{ounit → ounit2}/advanced/oUnitLoggerCI.ml
  30. 0 src/lib/{ounit → ounit2}/advanced/oUnitLoggerHTML.ml
  31. 0 src/lib/{ounit → ounit2}/advanced/oUnitLoggerJUnit.ml
  32. 0 src/lib/{ounit → ounit2}/advanced/oUnitLoggerStd.ml
  33. 0 src/lib/{ounit → ounit2}/advanced/oUnitPlugin.ml
  34. 0 src/lib/{ounit → ounit2}/advanced/oUnitPropList.ml
  35. 0 src/lib/{ounit → ounit2}/advanced/oUnitResultSummary.ml
  36. 0 src/lib/{ounit → ounit2}/advanced/oUnitRunner.ml
  37. 0 src/lib/{ounit → ounit2}/advanced/oUnitRunnerProcesses.ml
  38. 0 src/lib/{ounit → ounit2}/advanced/oUnitShared.ml
  39. 0 src/lib/{ounit → ounit2}/advanced/oUnitState.ml
  40. 0 src/lib/{ounit → ounit2}/advanced/oUnitTest.ml
  41. 0 src/lib/{ounit → ounit2}/advanced/oUnitTestData.ml
  42. 0 src/lib/{ounit → ounit2}/advanced/oUnitUtils.ml
  43. +3 −3 src/lib/{ounit → ounit2}/dune
  44. 0 src/lib/{ounit → ounit2}/index.mld
  45. 0 src/lib/{ounit → ounit2}/oUnit.ml
  46. 0 src/lib/{ounit → ounit2}/oUnit.mli
  47. 0 src/lib/{ounit → ounit2}/oUnit2.ml
  48. 0 src/lib/{ounit → ounit2}/oUnit2.mli
  49. +1 −1 src/lib/{ounit → ounit2}/threads/dune
  50. 0 src/lib/{ounit → ounit2}/threads/oUnitRunnerThreads.ml
  51. 0 src/lib/{ounit → ounit2}/threads/oUnitThreads.ml
  52. +1 −1 test/common/dune
  53. +1 −1 test/dune
  54. +1 −1 test/fakeBadFinaliser/dune
  55. +1 −1 test/fakeHTML/dune
  56. +1 −1 test/fakeRunner/dune
  57. +1 −1 test/fakeShared/dune
  58. +2 −2 test/lwt/dune
  59. +2 −2 test/lwt/testRunnerProcesses/dune
@@ -4,27 +4,35 @@ install: test -e .travis.opam.sh || wget https://raw.githubusercontent.com/ocaml
script: bash -ex .travis-opam.sh
env:
global:
- PACKAGE=ounit OUNIT_CI=true PINS="ounit:. ounit-lwt:."
- OUNIT_CI=true PINS="ounit:. ounit-lwt:. ounit2:. ounit2-lwt:."
matrix:
include:
- name: "ounit: linux"
apt:
packages:
- libxml2-utils
os: linux
env: OCAML_VERSION=4.08 PACKAGE="ounit"

- name: "ounit-lwt: linux"
os: linux
env: OCAML_VERSION=4.08 PACKAGE="ounit-lwt"

- name: "ounit: reverse dependencies with linux"
- name: "ounit2: linux"
apt:
packages:
- libxml2-utils
os: linux
env: OCAML_VERSION=4.08 PACKAGE="ounit2"

- name: "ounit2-lwt: linux"
os: linux
env: OCAML_VERSION=4.08 PACKAGE="ounit" REVDEPS="mock-ounit junit_ounit pa_ounit qcheck-ounit" POST_INSTALL_HOOK="opam install -t fileutils"
env: OCAML_VERSION=4.08 PACKAGE="ounit2-lwt"

- name: "ounit: old ocaml release with linux"
- name: "ounit2: reverse dependencies with linux"
os: linux
env: OCAML_VERSION=4.02 PACKAGE="ounit"
env: OCAML_VERSION=4.08 PACKAGE="ounit2" REVDEPS="mock-ounit junit_ounit pa_ounit qcheck-ounit" POST_INSTALL_HOOK="opam install -t fileutils"

- name: "ounit2: old ocaml release with linux"
os: linux
env: OCAML_VERSION=4.02 PACKAGE="ounit2"

- name: "ounit: MacOSX"
os: osx
@@ -33,9 +41,16 @@ matrix:
directories:
- $HOME/Library/Caches/Homebrew

- name: "ounit-lwt: MacOSX"
- name: "ounit2: MacOSX"
os: osx
env: OCAML_VERSION=4.08 PACKAGE="ounit-lwt"
env: OCAML_VERSION=4.08 PACKAGE="ounit2" REVDEPS="junit_ounit"
cache:
directories:
- $HOME/Library/Caches/Homebrew

- name: "ounit2-lwt: MacOSX"
os: osx
env: OCAML_VERSION=4.08 PACKAGE="ounit2-lwt"
cache:
directories:
- $HOME/Library/Caches/Homebrew
@@ -51,15 +51,16 @@ install: install-ounit install-ounit-lwt

install-ounit:
-ocamlfind remove oUnit
dune install ounit
ocamlfind install oUnit src/lib/ounit-old/META -patch-version $(version)
ocamlfind install oUnit src/lib/oUnit/META -patch-version $(version)

install-ounit-lwt:
dune install ounit-lwt
-ocamlfind remove ounit-lwt
ocamlfind install ounit-lwt src/lib/ounit-lwt/META -patch-version $(version)

uninstall:
dune uninstall
-ocamlfind remove oUnit
-ocamlfind remove ounit-lwt

clean:
dune clean
@@ -40,3 +40,15 @@ Examples
* [test_stack.ml](examples/test_stack.ml)
* External projects:
* [OASIS tests](https://github.com/ocaml/oasis/tree/master/test)

Transition to ounit2
--------------------

In the past OUnit used the library name "oUnit". It is uncommon to use uppercase
letters in library name. It caused some problems during the transition to
"dune". It was also not the same name as the OPAM package. As of version 2.2,
we have renamed the library ounit2.

To do the transition for your own tests:
* in OPAM, the library should now depends on "ounit2" or "ounit2-lwt"
* in dune files/OASIS/Makefile/pkg.ml replace "oUnit" by "ounit2"
@@ -5,8 +5,10 @@ environment:
FORK_USER: ocaml
FORK_BRANCH: master
CYG_ROOT: C:\cygwin64
PINS: ounit2:. ounit2-lwt:. ounit:. ounit-lwt:.
EXTRA_DEPS: dune
OUNIT_CI: true
# TODO: ounit -> ounit2
PACKAGE: ounit
REVDEPS: junit_ounit

@@ -1,3 +1,3 @@
(tests
(names test_list test_stack)
(libraries ounit))
(libraries ounit2))
@@ -6,17 +6,14 @@ dev-repo: "git+https://github.com/gildor478/ounit.git"
bug-reports: "https://github.com/gildor478/ounit/issues"
doc: "https://gildor478.github.io/ounit/"
depends: [
"ocaml" {>= "4.02.3"}
"dune" {>= "1.11.0"}
"lwt"
"ounit" {= version}
"ocamlfind"
"ounit2-lwt" {= version}
]
build: [
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc}
install: [
[ make "install-ounit-lwt" "version=%{version}%" ]
]
synopsis: "OUnit testing framework (Lwt)"
synopsis: "This is a transition package, ounit-lwt is now ounit2-lwt."
description:"""
This library contains helper functions for building Lwt tests using OUnit.
More details for the transition:
https://github.com/gildor478/ounit#transition-to-ounit2
"""
@@ -6,16 +6,8 @@ dev-repo: "git+https://github.com/gildor478/ounit.git"
bug-reports: "https://github.com/gildor478/ounit/issues"
doc: "https://gildor478.github.io/ounit/"
depends: [
"ocaml" {>= "4.02.3"}
"dune" {>= "1.11.0"}
"base-bytes"
"base-unix"
"stdlib-shims"
]
build: [
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc}
"ocamlfind"
"ounit2" {= version}
]
install: [
[ make "install-ounit" "version=%{version}%" ]
@@ -0,0 +1,22 @@
opam-version: "2.0"
maintainer: "Sylvain Le Gall <sylvaini+ocaml@le-gall.net>"
authors: [ "Sylvain Le Gall" ]
homepage: "https://github.com/gildor478/ounit"
dev-repo: "git+https://github.com/gildor478/ounit.git"
bug-reports: "https://github.com/gildor478/ounit/issues"
doc: "https://gildor478.github.io/ounit/"
depends: [
"ocaml" {>= "4.02.3"}
"dune" {>= "1.11.0"}
"lwt"
"ounit" {= version}
]
build: [
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc}
]
synopsis: "OUnit testing framework (Lwt)"
description:"""
This library contains helper functions for building Lwt tests using OUnit.
"""
@@ -0,0 +1,26 @@
opam-version: "2.0"
maintainer: "Sylvain Le Gall <sylvaini+ocaml@le-gall.net>"
authors: [ "Maas-Maarten Zeeman" "Sylvain Le Gall" ]
homepage: "https://github.com/gildor478/ounit"
dev-repo: "git+https://github.com/gildor478/ounit.git"
bug-reports: "https://github.com/gildor478/ounit/issues"
doc: "https://gildor478.github.io/ounit/"
depends: [
"ocaml" {>= "4.02.3"}
"dune" {>= "1.11.0"}
"base-bytes"
"base-unix"
"stdlib-shims"
]
build: [
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc}
]
synopsis: "OUnit testing framework"
description: """
OUnit is a unit test framework for OCaml. It allows one to easily create
unit-tests for OCaml code. It is loosely based on [HUnit], a unit testing
framework for Haskell. It is similar to [JUnit], and other XUnit testing
frameworks.
"""
@@ -0,0 +1,13 @@
description = "Transition package to ounit2"
requires = "ounit2"

package "threads" (
description = "Transition package to ounit2.threads"
requires = "ounit2.threads"
)

package "advanced" (
description = "Transition package to ounit2.advanced"
requires = "ounit2.advanced"
)

@@ -0,0 +1,2 @@
description = "Transition package to ounit2-lwt"
requires = "ounit2-lwt"

This file was deleted.

This file was deleted.

@@ -0,0 +1,4 @@
(library
(name oUnitLwt)
(public_name ounit2-lwt)
(libraries lwt lwt.unix ounit2.advanced))
File renamed without changes.
@@ -5,6 +5,6 @@

(library
(name oUnitAdvanced)
(public_name ounit.advanced)
(public_name ounit2.advanced)
(wrapped false)
(libraries unix bytes stdlib-shims))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,9 +1,9 @@
(library
(name oUnit)
(public_name ounit)
(public_name ounit2)
(wrapped false)
(libraries unix ounit.advanced))
(libraries unix ounit2.advanced))

(documentation
(package ounit)
(package ounit2)
(mld_files index))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
(library
(name oUnitThreads)
(public_name ounit.threads)
(public_name ounit2.threads)
(private_modules oUnitRunnerThreads)
(libraries threads oUnit))
File renamed without changes.
File renamed without changes.
@@ -3,4 +3,4 @@
(modules testCommonRunner segfault)
(c_names segfault)
(wrapped false)
(libraries ounit ounit.advanced))
(libraries ounit2 ounit2.advanced))
@@ -1,6 +1,6 @@
(test
(name test)
(libraries ounit ounit.advanced str testcommon)
(libraries ounit2 ounit2.advanced str testcommon)
(deps
test.exe
fakeHTML/fakeHTML.exe
@@ -1,3 +1,3 @@
(executable
(name fakeBadFinaliser)
(libraries ounit testcommon))
(libraries ounit2 testcommon))
@@ -1,3 +1,3 @@
(executable
(name fakeHTML)
(libraries ounit))
(libraries ounit2))
@@ -1,3 +1,3 @@
(executable
(name fakeRunner)
(libraries ounit ounit.threads testcommon))
(libraries ounit2 ounit2.threads testcommon))
@@ -1,3 +1,3 @@
(executable
(name fakeShared)
(libraries ounit ounit.threads))
(libraries ounit2 ounit2.threads))
@@ -1,4 +1,4 @@
(test
(name test)
(package ounit-lwt)
(libraries ounit ounit-lwt testcommon))
(package ounit2-lwt)
(libraries ounit2 ounit2-lwt testcommon))
@@ -1,6 +1,6 @@
(test
(name testRunnerProcesses)
(package ounit-lwt)
(package ounit2-lwt)
(deps test.txt)
(libraries ounit lwt lwt.unix ounit-lwt)
(libraries ounit2 lwt lwt.unix ounit2-lwt)
(action (run %{test} -runner processes)))

0 comments on commit 53b9d1a

Please sign in to comment.
You can’t perform that action at this time.