summaryrefslogtreecommitdiffstats
path: root/lowercasing_test/src/tests/hello-world
diff options
context:
space:
mode:
Diffstat (limited to 'lowercasing_test/src/tests/hello-world')
-rw-r--r--lowercasing_test/src/tests/hello-world/.gitignore6
-rw-r--r--lowercasing_test/src/tests/hello-world/CMakeLists.txt8
-rw-r--r--lowercasing_test/src/tests/hello-world/DESC1
-rw-r--r--lowercasing_test/src/tests/hello-world/FILES5
-rw-r--r--lowercasing_test/src/tests/hello-world/HelloWorldLocal.java8
-rwxr-xr-xlowercasing_test/src/tests/hello-world/dotest.sh15
-rw-r--r--lowercasing_test/src/tests/hello-world/hello-world-local.cpp24
-rwxr-xr-xlowercasing_test/src/tests/hello-world/hello-world_test.sh5
-rw-r--r--lowercasing_test/src/tests/hello-world/ref.txt6
9 files changed, 78 insertions, 0 deletions
diff --git a/lowercasing_test/src/tests/hello-world/.gitignore b/lowercasing_test/src/tests/hello-world/.gitignore
new file mode 100644
index 00000000000..40a57ff7d39
--- /dev/null
+++ b/lowercasing_test/src/tests/hello-world/.gitignore
@@ -0,0 +1,6 @@
+.depend
+HelloWorldLocal.class
+Makefile
+hello-world-local
+out.txt
+lowercasing_test_hello-world-local_app
diff --git a/lowercasing_test/src/tests/hello-world/CMakeLists.txt b/lowercasing_test/src/tests/hello-world/CMakeLists.txt
new file mode 100644
index 00000000000..ec4d0c68532
--- /dev/null
+++ b/lowercasing_test/src/tests/hello-world/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+vespa_add_executable(lowercasing_test_hello-world-local_app
+ SOURCES
+ hello-world-local.cpp
+ DEPENDS
+ lowercasing_test_hello-world-lib
+)
+vespa_add_test(NAME lowercasing_test_hello-world-local_app NO_VALGRIND COMMAND sh hello-world_test.sh)
diff --git a/lowercasing_test/src/tests/hello-world/DESC b/lowercasing_test/src/tests/hello-world/DESC
new file mode 100644
index 00000000000..47ab72663ef
--- /dev/null
+++ b/lowercasing_test/src/tests/hello-world/DESC
@@ -0,0 +1 @@
+Initial test to verify the integrity of this testing module.
diff --git a/lowercasing_test/src/tests/hello-world/FILES b/lowercasing_test/src/tests/hello-world/FILES
new file mode 100644
index 00000000000..beec05c0632
--- /dev/null
+++ b/lowercasing_test/src/tests/hello-world/FILES
@@ -0,0 +1,5 @@
+hello-world-local.cpp
+HelloWorldLocal.java
+dotest.sh
+out.txt
+ref.txt
diff --git a/lowercasing_test/src/tests/hello-world/HelloWorldLocal.java b/lowercasing_test/src/tests/hello-world/HelloWorldLocal.java
new file mode 100644
index 00000000000..a0928a58c99
--- /dev/null
+++ b/lowercasing_test/src/tests/hello-world/HelloWorldLocal.java
@@ -0,0 +1,8 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+public class HelloWorldLocal
+{
+ public static void main(String[] args)
+ {
+ System.out.println("Java/local/Hello World");
+ }
+}
diff --git a/lowercasing_test/src/tests/hello-world/dotest.sh b/lowercasing_test/src/tests/hello-world/dotest.sh
new file mode 100755
index 00000000000..8a183b81148
--- /dev/null
+++ b/lowercasing_test/src/tests/hello-world/dotest.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+. ../../binref/env.sh
+
+./lowercasing_test_hello-world-local_app > out.txt
+$HELLO_WORLD_APP >> out.txt
+$BINREF/runjava HelloWorldLocal >> out.txt
+$BINREF/runjava HelloWorld >> out.txt
+
+if diff -u out.txt ref.txt; then
+ exit 0
+else
+ exit 1
+fi
diff --git a/lowercasing_test/src/tests/hello-world/hello-world-local.cpp b/lowercasing_test/src/tests/hello-world/hello-world-local.cpp
new file mode 100644
index 00000000000..f9f42cf6b59
--- /dev/null
+++ b/lowercasing_test/src/tests/hello-world/hello-world-local.cpp
@@ -0,0 +1,24 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/fastos/fastos.h>
+#include <grouping_test/hello-world-lib/hello-world.h>
+
+class App : public FastOS_Application
+{
+public:
+ int Main();
+};
+
+int
+App::Main()
+{
+ HelloWorld::print();
+ fprintf(stdout, "C++/local/Hello World\n");
+ return 0;
+}
+
+int
+main(int argc, char **argv)
+{
+ App myapp;
+ return myapp.Entry(argc, argv);
+}
diff --git a/lowercasing_test/src/tests/hello-world/hello-world_test.sh b/lowercasing_test/src/tests/hello-world/hello-world_test.sh
new file mode 100755
index 00000000000..8895f89feb3
--- /dev/null
+++ b/lowercasing_test/src/tests/hello-world/hello-world_test.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+. ../../binref/env.sh
+$BINREF/compilejava HelloWorldLocal.java
+sh dotest.sh
diff --git a/lowercasing_test/src/tests/hello-world/ref.txt b/lowercasing_test/src/tests/hello-world/ref.txt
new file mode 100644
index 00000000000..5f2f17f3e52
--- /dev/null
+++ b/lowercasing_test/src/tests/hello-world/ref.txt
@@ -0,0 +1,6 @@
+C++/lib/Hello World
+C++/local/Hello World
+C++/lib/Hello World
+C++/app/Hello World
+Java/local/Hello World
+Java/jar/HelloWorld