Skip to content

Commit

Permalink
Remove library tests macos win32 (#53)
Browse files Browse the repository at this point in the history
* remove library test on macOS and win32

* only simple tests (-e"_U=true")
  • Loading branch information
swaldhoer authored Oct 15, 2019
1 parent bb144f0 commit d5b7b4b
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 48 deletions.
17 changes: 7 additions & 10 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog`_ v1.0.0, and this project adheres to
`Semantic Versioning`_ v2.0.0.

************
[Unreleased]
************
********************
[0.1.0] - 2019-10-15
********************

Added
=====
Expand All @@ -25,6 +25,8 @@ Added
https://github.com/readthedocs/sphinx_rtd_theme)
- Added a batch wrapper script for waf on Windows (``waf.bat``)
- Added test files for Windows and Cygwin to test the build tools
- For Linux (clang, gcc), macOS (clang), FreeBSD (clang, gcc) and Windows
(clang, gcc, msvc) the lua test suite passes with ``lua -e"_U=true" all.lua``

Changed
=======
Expand All @@ -34,14 +36,11 @@ Changed
- Rewrote `configure` step to print better readable output.
- Restructured the way sources, documentation etc. are stored.

Deprecated
==========

Removed
=======

- ``lua/wscript``, see section `Changed`.
- Removed support for python versions < 3.5
- Removed support for Python versions < 3.5

Fixed
=====
Expand All @@ -52,9 +51,7 @@ Fixed
- Fixed clang linker flag on OSX.
- Fixed clang linker flags on Windows.
- Fix name (``LICENSE``)

Security
========
- Fixed typos

.. _Keep a Changelog : https://keepachangelog.com/en/1.0.0/

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ project:
.. code-block:: sh
$ build/gcc/lua -v
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio [based on native Lua (0.1.0-development), https://github.com/swaldhoer/native-lua]
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio [based on native Lua (0.1.0), https://github.com/swaldhoer/native-lua]
``tests`` Directory
===================
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
native-lua: 0.1.0-development
native-lua: 0.1.0
lua: 5.3.4
tests: 5.3.4
26 changes: 14 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ jobs:
displayName: test script (gcc, clang) with --simple-test and ltests
- job: Windows
pool:
vmImage: 'vs2017-win2016'
displayName: "Windows Build"
steps:
- script: echo $(Agent.OS)
# - job: Windows
# pool:
# vmImage: 'vs2017-win2016'
# displayName: "Windows Build"
# steps:
# - script: echo $(Agent.OS)

- job: OSXBuild
pool:
Expand All @@ -128,6 +128,8 @@ jobs:
steps:
- script: echo "##vso[task.prependpath]/usr/local/opt/python/libexec/bin"
displayName: Add python to path
- script: echo "##vso[task.prependpath]/opt/lua/bin"
displayName: Add lua install path to path
- script: echo "##vso[task.prependpath]/usr/local/Cellar/gcc/9.1.0/bin/"
displayName: Add gcc to path
- script: echo $PATH
Expand All @@ -153,12 +155,12 @@ jobs:
set -euxo pipefail
python waf configure --include-tests --prefix=/opt/lua
python waf build_clang
python waf install_clang
sudo python waf install_clang
pushd build/clang/tests
lua -e"_U=true" all.lua
lua all.lua
# lua all.lua
popd
python waf uninstall_clang
sudo python waf uninstall_clang
python waf clean_clang
python waf distclean
displayName: clang build including tests
Expand All @@ -167,11 +169,11 @@ jobs:
set -euxo pipefail
python waf configure --ltests --include-tests --prefix=/opt/lua
python waf build_clang
python waf install_clang
sudo python waf install_clang
pushd build/clang/tests
lua -e"_U=true" all.lua
lua all.lua
# lua all.lua
popd
python waf uninstall_clang
sudo python waf uninstall_clang
python waf clean_clang
displayName: clang build including tests and ltests
2 changes: 1 addition & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
copyright = "2018-2019, Stefan Waldhör"
author = "Stefan Waldhör"

version = "0.1.0-development"
version = "0.1.0"
release = version

language = "en"
Expand Down
60 changes: 37 additions & 23 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ from waflib.Tools.gnu_dirs import gnuopts
# man1 is missing waf gnu_dirs implementation
gnuopts += "mandir1, manual pages, ${DATAROOTDIR}/man1\n"

VERSION = "0.1.0-development"
VERSION = "0.1.0"
APPNAME = "lua"
top = "." # pylint: disable=C0103
out = "build" # pylint: disable=C0103
Expand Down Expand Up @@ -942,28 +942,30 @@ def build_darwin(bld):
)

if bld.env.include_tests:
bld.path.get_bld().make_node(bld.env.tests_basepath + "/libs/P1").mkdir()
for tst_src in bld.env.test_sources:
outfile = re.match(".*?([0-9]+.c)$", tst_src).group(1).split(".")[0]
outfile = bld.env.tests_basepath + "/libs/" + outfile
bld.shlib(
source=tst_src,
target=outfile,
defines=defines_tests,
includes=os.path.abspath(
os.path.join(bld.path.abspath(), bld.env.src_basepath)
),
)
if bld.env.CC_NAME == "gcc":
ext = ".so"
elif bld.env.CC_NAME == "clang":
ext = ".dylib"
bld(
features="subst",
source=bld.env.tests_basepath + "/libs/lib2" + ext,
target=bld.env.tests_basepath + "/libs/lib2-v2" + ext,
is_copy=True,
)
pass
# https://github.com/swaldhoer/native-lua/issues/44
# bld.path.get_bld().make_node(bld.env.tests_basepath + "/libs/P1").mkdir()
# for tst_src in bld.env.test_sources:
# outfile = re.match(".*?([0-9]+.c)$", tst_src).group(1).split(".")[0]
# outfile = bld.env.tests_basepath + "/libs/" + outfile
# bld.shlib(
# source=tst_src,
# target=outfile,
# defines=defines_tests,
# includes=os.path.abspath(
# os.path.join(bld.path.abspath(), bld.env.src_basepath)
# ),
# )
# if bld.env.CC_NAME == "gcc":
# ext = ".so"
# elif bld.env.CC_NAME == "clang":
# ext = ".dylib"
# bld(
# features="subst",
# source=bld.env.tests_basepath + "/libs/lib2" + ext,
# target=bld.env.tests_basepath + "/libs/lib2-v2" + ext,
# is_copy=True,
# )


def build_win32(bld):
Expand Down Expand Up @@ -1005,6 +1007,10 @@ def build_win32(bld):
use=["static-lua-library"],
)

if bld.env.include_tests:
pass
# https://github.com/swaldhoer/native-lua/issues/46

def build_win32_gcc():
"""Building on win32 with gcc"""
use = ["M"]
Expand Down Expand Up @@ -1037,6 +1043,10 @@ def build_win32(bld):
use=["static-lua-library"] + use,
)

if bld.env.include_tests:
pass
# https://github.com/swaldhoer/native-lua/issues/46

def build_win32_clang():
"""Building on win32 with clang"""
use = ["M"]
Expand Down Expand Up @@ -1069,6 +1079,10 @@ def build_win32(bld):
use=["static-lua-library"] + use,
)

if bld.env.include_tests:
pass
# https://github.com/swaldhoer/native-lua/issues/46

if bld.env.CC_NAME == "msvc":
build_win32_msvc()
elif bld.env.CC_NAME == "gcc":
Expand Down

0 comments on commit d5b7b4b

Please sign in to comment.