[librsvg] NMake Makefiles: Support running rsvg_internals tests
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] NMake Makefiles: Support running rsvg_internals tests
- Date: Wed, 25 Mar 2020 07:18:52 +0000 (UTC)
commit dfcaf1f10d5762ac769cf5bf9ae9175e81f4ff82
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Mar 25 15:14:28 2020 +0800
NMake Makefiles: Support running rsvg_internals tests
Add an NMake Makefile target that calls `cargo test` in rsvg_internals/ with
the appropriate flags for our Visual Studio builds, so that we can test the
Rust bits in our Visual Studio builds as well
win32/Makefile.vc | 11 +++++++++++
win32/README.txt | 3 +++
2 files changed, 14 insertions(+)
---
diff --git a/win32/Makefile.vc b/win32/Makefile.vc
index a2bc5c6c..e4d315e8 100644
--- a/win32/Makefile.vc
+++ b/win32/Makefile.vc
@@ -44,6 +44,17 @@ tests: all $(rsvg_tests)
set G_TEST_SRCDIR=$(MAKEDIR)\..\tests
@for %%x in ($(rsvg_tests)) do %%x
+rsvg_rust_tests:
+ @set PATH=%PATH%;%HOMEPATH%\.cargo\bin
+ @set CARGO_TARGET_DIR=..\win32\vs$(VSVER)\$(CFG)\$(PLAT)\obj\rsvg_c_api
+ @set GTK_LIB_DIR=$(LIBDIR);$(LIB)
+ $(RUSTUP_CMD)
+ @cd ..\rsvg_internals
+ $(CARGO_CMD:build=test) --verbose
+ @cd ..\win32
+ @set GTK_LIB_DIR=
+ @set CARGO_TARGET_DIR=
+
# Include the rules for build directory creation and code generation
!include generate-msvc.mak
diff --git a/win32/README.txt b/win32/README.txt
index 0cd39863..a7e31a83 100644
--- a/win32/README.txt
+++ b/win32/README.txt
@@ -63,6 +63,9 @@ for all targets.
the introspection files (.gir/.typelib) for librsvg.
-all: see (not specified).
-tests: Same as (not specified) but also builds the test programs in $(srcroot)\tests
+-rsvg_rust_tests: Makes a build of the rust items into an executable to test the rust
+ bits. You may need to make a copy of libxml2.lib (or so) to xml2.lib
+ in order to build this successfully.
-clean: Removes all build files
-install: Same as (not specified) and also copies the built DLLs, .lib's, headers,
tools and possibly introspection files to appropriate locations under
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]