Merge "Make tests executable with BUCK"
diff --git a/.gitignore b/.gitignore
index 4fd69d7..f9fe05c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
bucklets
.buckversion
.watchmanconfig
+.buckd
diff --git a/BUCK b/BUCK
index 27d3a0c..5b4714d 100644
--- a/BUCK
+++ b/BUCK
@@ -16,3 +16,14 @@
name = 'classpath',
deps = [':server-config__plugin'],
)
+
+java_test(
+ name = 'server-config_tests',
+ srcs = glob(['src/test/java/**/*.java']),
+ labels = ['server-config-plugin'],
+ deps = GERRIT_PLUGIN_API + [
+ ':server-config__plugin',
+ '//lib:junit',
+ ],
+ source_under_test = [':server-config__plugin'],
+)
diff --git a/lib/BUCK b/lib/BUCK
new file mode 100644
index 0000000..dc55495
--- /dev/null
+++ b/lib/BUCK
@@ -0,0 +1,17 @@
+include_defs('//bucklets/maven_jar.bucklet')
+
+maven_jar(
+ name = 'junit',
+ id = 'junit:junit:4.11',
+ sha1 = '4e031bb61df09069aeb2bffb4019e7a5034a4ee0',
+ license = 'DO_NOT_DISTRIBUTE',
+ deps = [':hamcrest-core'],
+)
+
+maven_jar(
+ name = 'hamcrest-core',
+ id = 'org.hamcrest:hamcrest-core:1.3',
+ sha1 = '42a25dc3219429f0e5d060061f71acb49bf010a0',
+ license = 'DO_NOT_DISTRIBUTE',
+ visibility = ['//lib:junit'],
+)
diff --git a/src/main/resources/Documentation/build.md b/src/main/resources/Documentation/build.md
index 6d1e8da..e58c2b5 100644
--- a/src/main/resources/Documentation/build.md
+++ b/src/main/resources/Documentation/build.md
@@ -50,6 +50,12 @@
buck-out/gen/server-config.jar
```
+Test are executed with
+
+```
+ buck test
+```
+
### Build in Gerrit tree
@@ -72,6 +78,12 @@
./tools/eclipse/project.py
```
+Test are executed with
+
+```
+ buck test --include server-config-plugin
+```
+
Maven
-----