Legoktm has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/372996 )
Change subject: Add "make test" target
......................................................................
Add "make test" target
Rename the directory containing the file to "tests" so make doesn't
think it already exists.
And add a .gitignore for things that are built.
Bug: T152740
Change-Id: If280da19ecaaec9af31e2232bbc4f2cea73e91bf
---
A .gitignore
M Makefile
R tests/RollingBlockCounterTest.cpp
3 files changed, 9 insertions(+), 3 deletions(-)
Approvals:
Legoktm: Verified; Looks good to me, approved
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..302f31b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/uprightdiff
+/test
diff --git a/Makefile b/Makefile
index 46ba8e9..0d0428c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
CFLAGS +=-g -std=c++11 -Wall -O2
PREFIX=/usr
-all: uprightdiff
+all: uprightdiff test
install: all
install -d $(DESTDIR)$(PREFIX)/bin
@@ -15,5 +15,9 @@
-lboost_program_options \
-o uprightdiff
+test:
+ g++ $(CFLAGS) tests/RollingBlockCounterTest.cpp -lopencv_core -o test
+ ./test
+
clean:
- rm -f uprightdiff
+ rm -f uprightdiff test
diff --git a/test/RollingBlockCounterTest.cpp
b/tests/RollingBlockCounterTest.cpp
similarity index 97%
rename from test/RollingBlockCounterTest.cpp
rename to tests/RollingBlockCounterTest.cpp
index ae2a85d..47315ea 100644
--- a/test/RollingBlockCounterTest.cpp
+++ b/tests/RollingBlockCounterTest.cpp
@@ -1,6 +1,6 @@
#include <iostream>
#include <opencv2/core/core.hpp>
-#include "RollingBlockCounter.h"
+#include "../RollingBlockCounter.h"
typedef cv::Mat_<int> Mat1i;
bool good = true;
--
To view, visit https://gerrit.wikimedia.org/r/372996
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If280da19ecaaec9af31e2232bbc4f2cea73e91bf
Gerrit-PatchSet: 1
Gerrit-Project: integration/uprightdiff
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits