Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
0ef70b4a
Commit
0ef70b4a
authored
Nov 23, 2010
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the test suite depend on the static library
Signed-off-by: Vicent Marti <tanoku@gmail.com>
parent
405ac511
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
wscript
+10
-6
No files found.
wscript
View file @
0ef70b4a
...
@@ -71,6 +71,7 @@ def build(bld):
...
@@ -71,6 +71,7 @@ def build(bld):
# command '[build|clean]-tests'
# command '[build|clean]-tests'
elif bld.variant == 'tests':
elif bld.variant == 'tests':
build_library(bld, 'cstlib')
build_tests(bld)
build_tests(bld)
# command 'build|clean|install|uninstall': by default, run
# command 'build|clean|install|uninstall': by default, run
...
@@ -105,7 +106,7 @@ def build_library(bld, lib_str):
...
@@ -105,7 +106,7 @@ def build_library(bld, lib_str):
target='git2',
target='git2',
includes='src',
includes='src',
install_path='${LIBDIR}',
install_path='${LIBDIR}',
use=ALL_LIBS
#if lib_str == 'cshlib' else []
use=ALL_LIBS
)
)
# On Unix systems, build the Pkg-config entry file
# On Unix systems, build the Pkg-config entry file
...
@@ -151,8 +152,8 @@ def build_tests(bld):
...
@@ -151,8 +152,8 @@ def build_tests(bld):
defines=['TEST_TOC="%s.toc"' % test_name],
defines=['TEST_TOC="%s.toc"' % test_name],
install_path=None,
install_path=None,
stlib=['git2'], # link with the git2 static lib we've just compiled'
stlib=['git2'], # link with the git2 static lib we've just compiled'
stlibpath=[directory.find_node('build/
static
/').abspath(), directory.abspath()],
stlibpath=[directory.find_node('build/
tests
/').abspath(), directory.abspath()],
use=['test_helper'] + ALL_LIBS # link with all the libs we know
use=['test_helper'
, 'git2'
] + ALL_LIBS # link with all the libs we know
# libraries which are not enabled won't link
# libraries which are not enabled won't link
)
)
...
@@ -163,7 +164,7 @@ class _test(BuildContext):
...
@@ -163,7 +164,7 @@ class _test(BuildContext):
def test(bld):
def test(bld):
from waflib import Options
from waflib import Options
Options.commands = ['build-
static', 'build-
tests', 'run-tests'] + Options.commands
Options.commands = ['build-tests', 'run-tests'] + Options.commands
class _run_tests(Context):
class _run_tests(Context):
...
@@ -171,14 +172,17 @@ class _run_tests(Context):
...
@@ -171,14 +172,17 @@ class _run_tests(Context):
fun = 'run_tests'
fun = 'run_tests'
def run_tests(ctx):
def run_tests(ctx):
import shutil
import shutil
, sys
failed = False
failed = False
test_folder = ctx.path.make_node('tests/tmp/')
test_folder = ctx.path.make_node('tests/tmp/')
test_folder.mkdir()
test_folder.mkdir()
test_glob = 'build/tests/t????-*'
test_glob = 'build/tests/t????-*'
for test in ctx.path.ant_glob(test_glob, excl='build/tests/*.manifest'):
if sys.platform == 'win32':
test_glob = 'build/tests/t????-*.exe'
for test in ctx.path.ant_glob(test_glob):
if ctx.exec_command(test.abspath(), cwd=test_folder.abspath()) != 0:
if ctx.exec_command(test.abspath(), cwd=test_folder.abspath()) != 0:
failed = True
failed = True
break
break
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment