diff options
author | Bjørn Christian Seime <bjorn.christian@seime.no> | 2016-06-28 15:02:05 +0200 |
---|---|---|
committer | Vegard Sjonfjell <vegardsjo@gmail.com> | 2016-06-28 15:02:05 +0200 |
commit | 4793d5fede988b8855c16e092a6df56f21c07d7f (patch) | |
tree | 5f12dc3c03ec8586fc676e92d3173a6164c19120 /lowercasing_test | |
parent | 95c79e22adc07931d4a935ecf6df2da0c3662ea0 (diff) |
WIP (#245)
Diffstat (limited to 'lowercasing_test')
27 files changed, 0 insertions, 307 deletions
diff --git a/lowercasing_test/CMakeLists.txt b/lowercasing_test/CMakeLists.txt index 159b6f6a4d4..79da02985b3 100644 --- a/lowercasing_test/CMakeLists.txt +++ b/lowercasing_test/CMakeLists.txt @@ -8,11 +8,7 @@ vespa_define_module( APPS src/binref - src/java TESTS - src/grouping_test/hello-world - src/grouping_test/hello-world-lib - src/tests/hello-world src/tests/lowercasing ) diff --git a/lowercasing_test/README b/lowercasing_test/README index 347914fce0c..883d38fffff 100644 --- a/lowercasing_test/README +++ b/lowercasing_test/README @@ -1,5 +1 @@ This module was created to test that lowercasing is consistent across Java and C++. - -If you want to copy the infrastructure from this module you should try -to copy the hello-world test; it is designed to verify the integrity -of the testing module itself. diff --git a/lowercasing_test/src/.gitignore b/lowercasing_test/src/.gitignore index a39df0815b3..d4590f3a58c 100644 --- a/lowercasing_test/src/.gitignore +++ b/lowercasing_test/src/.gitignore @@ -1,3 +1,2 @@ Makefile.ini config_command.sh -project.dsw diff --git a/lowercasing_test/src/binref/env.sh.in b/lowercasing_test/src/binref/env.sh.in index 6a0770c5f9b..dda4234226f 100644 --- a/lowercasing_test/src/binref/env.sh.in +++ b/lowercasing_test/src/binref/env.sh.in @@ -1,4 +1,2 @@ BINREF=@CMAKE_CURRENT_BINARY_DIR@ export BINREF -HELLO_WORLD_APP=$BINREF/../grouping_test/hello-world/lowercasing_test_hello-world_app -export HELLO_WORLD_APP diff --git a/lowercasing_test/src/binref/progctl.sh b/lowercasing_test/src/binref/progctl.sh deleted file mode 120000 index 2c1fb1d47ce..00000000000 --- a/lowercasing_test/src/binref/progctl.sh +++ /dev/null @@ -1 +0,0 @@ -../../../vespalib/src/vespa/vespalib/testkit/progctl.sh
\ No newline at end of file diff --git a/lowercasing_test/src/grouping_test/hello-world-lib/.gitignore b/lowercasing_test/src/grouping_test/hello-world-lib/.gitignore deleted file mode 100644 index 5dae353d999..00000000000 --- a/lowercasing_test/src/grouping_test/hello-world-lib/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.depend -Makefile diff --git a/lowercasing_test/src/grouping_test/hello-world-lib/CMakeLists.txt b/lowercasing_test/src/grouping_test/hello-world-lib/CMakeLists.txt deleted file mode 100644 index a6e6876f152..00000000000 --- a/lowercasing_test/src/grouping_test/hello-world-lib/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -vespa_add_library(lowercasing_test_hello-world-lib STATIC - SOURCES - hello-world.cpp - DEPENDS -) diff --git a/lowercasing_test/src/grouping_test/hello-world-lib/hello-world.cpp b/lowercasing_test/src/grouping_test/hello-world-lib/hello-world.cpp deleted file mode 100644 index d280665ae7d..00000000000 --- a/lowercasing_test/src/grouping_test/hello-world-lib/hello-world.cpp +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include "hello-world.h" -#include <stdio.h> - -void -HelloWorld::print() -{ - fprintf(stdout, "C++/lib/Hello World\n"); -} diff --git a/lowercasing_test/src/grouping_test/hello-world-lib/hello-world.h b/lowercasing_test/src/grouping_test/hello-world-lib/hello-world.h deleted file mode 100644 index 4bca4064da0..00000000000 --- a/lowercasing_test/src/grouping_test/hello-world-lib/hello-world.h +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#pragma once - -class HelloWorld -{ -public: - static void print(); -}; - diff --git a/lowercasing_test/src/grouping_test/hello-world/.gitignore b/lowercasing_test/src/grouping_test/hello-world/.gitignore deleted file mode 100644 index 49082b83c4d..00000000000 --- a/lowercasing_test/src/grouping_test/hello-world/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.depend -Makefile -hello-world -lowercasing_test_hello-world_app diff --git a/lowercasing_test/src/grouping_test/hello-world/CMakeLists.txt b/lowercasing_test/src/grouping_test/hello-world/CMakeLists.txt deleted file mode 100644 index 2d6940ef4d8..00000000000 --- a/lowercasing_test/src/grouping_test/hello-world/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -# 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_app - SOURCES - hello-world.cpp - INSTALL bin - DEPENDS - lowercasing_test_hello-world-lib -) diff --git a/lowercasing_test/src/grouping_test/hello-world/hello-world.cpp b/lowercasing_test/src/grouping_test/hello-world/hello-world.cpp deleted file mode 100644 index 42504323bbe..00000000000 --- a/lowercasing_test/src/grouping_test/hello-world/hello-world.cpp +++ /dev/null @@ -1,24 +0,0 @@ -// 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++/app/Hello World\n"); - return 0; -} - -int -main(int argc, char **argv) -{ - App myapp; - return myapp.Entry(argc, argv); -} diff --git a/lowercasing_test/src/java/.gitignore b/lowercasing_test/src/java/.gitignore deleted file mode 100644 index b9e1611ac9e..00000000000 --- a/lowercasing_test/src/java/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -build.inc -classes -lowercasing_test.jar -java_code_compiled diff --git a/lowercasing_test/src/java/CMakeLists.txt b/lowercasing_test/src/java/CMakeLists.txt deleted file mode 100644 index 34b531c2093..00000000000 --- a/lowercasing_test/src/java/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/java_code_compiled - COMMAND ant -q -buildfile ${CMAKE_CURRENT_SOURCE_DIR}/build.xml >>/dev/null - COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/java_code_compiled - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/build.xml ${CMAKE_CURRENT_SOURCE_DIR}/HelloWorld.java) -add_custom_target(lowercasing_test_java ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/java_code_compiled) diff --git a/lowercasing_test/src/java/HelloWorld.java b/lowercasing_test/src/java/HelloWorld.java deleted file mode 100644 index 37d7bf11af7..00000000000 --- a/lowercasing_test/src/java/HelloWorld.java +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -public class HelloWorld -{ - public static void main(String[] args) - { - System.out.println("Java/jar/HelloWorld"); - } -} diff --git a/lowercasing_test/src/java/build.xml b/lowercasing_test/src/java/build.xml deleted file mode 100644 index 9e70af511f4..00000000000 --- a/lowercasing_test/src/java/build.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> -<project basedir="." default="all" name="lowercasing_test"> - <!-- Written to assume that classpath is rooted in the current directory. --> - <!-- So this should be OK if you make this script in the root of a filesystem. --> - <!-- If not, just change src.dir to be the root of your sources' package tree --> - <!-- and use e.g. View over a Filesystem to mount that subdirectory with all capabilities. --> - <!-- The idea is that both Ant and NetBeans have to know what the package root is --> - <!-- for the classes in your application. --> - - <!-- Don't worry if you don't know the Ant syntax completely or need help on some tasks! --> - <!-- The standard Ant documentation can be downloaded from AutoUpdate and --> - <!-- and then you can access the Ant manual in the online help. --> - - <property file="build.inc" /> - - <target name="init"> - <property location="classes" name="classes.dir"/> - <property location="." name="src.dir"/> - <property location="doc/api" name="javadoc.dir"/> - <property name="project.name" value="${ant.project.name}"/> - <property location="${project.name}.jar" name="jar"/> - </target> - - <target depends="init" name="compile"> - <!-- Both srcdir and destdir should be package roots. --> - <mkdir dir="${classes.dir}"/> - <javac debug="true" deprecation="true" destdir="${classes.dir}" srcdir="${src.dir}" includeantruntime="false"> - <classpath> - </classpath> - <!-- To add something to the classpath: --> - <!-- <classpath><pathelement location="${mylib}"/></classpath> --> - <!-- To exclude some files: --> - <!-- <exclude name="com/foo/SomeFile.java"/><exclude name="com/foo/somepackage/"/> --> - </javac> - </target> - - <target depends="init,compile" name="jar"> - <!-- To make a standalone app, insert into <jar>: --> - <!-- <manifest><attribute name="Main-Class" value="com.foo.Main"/></manifest> --> - <jar basedir="${classes.dir}" compress="true" jarfile="${jar}"/> - </target> - - <target depends="init,jar" description="Build everything." name="all"/> - - <target depends="init" description="Javadoc for my API." name="javadoc"> - <mkdir dir="${javadoc.dir}"/> - <javadoc destdir="${javadoc.dir}" packagenames="*"> - <sourcepath> - <pathelement location="${src.dir}"/> - </sourcepath> - </javadoc> - </target> - - <target depends="init" description="Clean all build products." name="clean"> - <delete dir="${classes.dir}"/> - <delete dir="${javadoc.dir}"/> - <delete file="${jar}"/> - </target> - -</project> diff --git a/lowercasing_test/src/testlist.txt b/lowercasing_test/src/testlist.txt deleted file mode 100644 index e5735a07456..00000000000 --- a/lowercasing_test/src/testlist.txt +++ /dev/null @@ -1,2 +0,0 @@ -tests/hello-world -tests/lowercasing diff --git a/lowercasing_test/src/tests/create-test.sh b/lowercasing_test/src/tests/create-test.sh deleted file mode 100755 index feca94c7de2..00000000000 --- a/lowercasing_test/src/tests/create-test.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh -# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -gen_ignore_file() { - echo "generating '$1' ..." - echo ".depend" > $1 - echo "Makefile" >> $1 - echo "${test}_test" >> $1 -} - -gen_project_file() { - echo "generating '$1' ..." - echo "APPLICATION ${test}_test" > $1 - echo "OBJS $test" >> $1 - echo "EXTERNALLIBS searchlib" >> $1 - echo "EXTERNALLIBS vespalib" >> $1 - echo "EXTERNALLIBS vespalog" >> $1 - echo "" >> $1 - echo "CUSTOMMAKE" >> $1 - echo "test: depend ${test}_test" >> $1 - echo -e "\t@./${test}_test" >> $1 -} - -gen_source() { - echo "generating '$1' ..." - echo "#include <vespa/log/log.h>" > $1 - echo "LOG_SETUP(\"${test}_test\");" >> $1 - echo "#include <vespa/fastos/fastos.h>" >> $1 - echo "#include <vespa/vespalib/testkit/testapp.h>" >> $1 - echo "" >> $1 - echo "" >> $1 - echo "TEST_SETUP(Test);" >> $1 - echo "" >> $1 - echo "int" >> $1 - echo "Test::Main()" >> $1 - echo "{" >> $1 - echo " TEST_INIT(\"${test}_test\");" >> $1 - echo " TEST_DONE();" >> $1 - echo "}" >> $1 -} - -gen_desc() { - echo "generating '$1' ..." - echo "$test test. Take a look at $test.cpp for details." > $1 -} - -gen_file_list() { - echo "generating '$1' ..." - echo "$test.cpp" > $1 -} - -if [ $# -ne 1 ]; then - echo "usage: $0 <name>" - echo " name: name of the test to create" - exit 1 -fi - -test=$1 -if [ -e $test ]; then - echo "$test already present, don't want to mess it up..." - exit 1 -fi - -echo "creating directory '$test' ..." -mkdir -p $test || exit 1 -cd $test || exit 1 -test=`basename $test` - -gen_ignore_file .cvsignore -gen_project_file fastos.project -gen_source $test.cpp -gen_desc DESC -gen_file_list FILES diff --git a/lowercasing_test/src/tests/hello-world/.gitignore b/lowercasing_test/src/tests/hello-world/.gitignore deleted file mode 100644 index 40a57ff7d39..00000000000 --- a/lowercasing_test/src/tests/hello-world/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.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 deleted file mode 100644 index 079fbe85d71..00000000000 --- a/lowercasing_test/src/tests/hello-world/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -# 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 TEST - 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 deleted file mode 100644 index 47ab72663ef..00000000000 --- a/lowercasing_test/src/tests/hello-world/DESC +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index beec05c0632..00000000000 --- a/lowercasing_test/src/tests/hello-world/FILES +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index a0928a58c99..00000000000 --- a/lowercasing_test/src/tests/hello-world/HelloWorldLocal.java +++ /dev/null @@ -1,8 +0,0 @@ -// 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 deleted file mode 100755 index 53f66a84ffe..00000000000 --- a/lowercasing_test/src/tests/hello-world/dotest.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -set -e - -. ../../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 deleted file mode 100644 index f9f42cf6b59..00000000000 --- a/lowercasing_test/src/tests/hello-world/hello-world-local.cpp +++ /dev/null @@ -1,24 +0,0 @@ -// 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 deleted file mode 100755 index f83dcbe2584..00000000000 --- a/lowercasing_test/src/tests/hello-world/hello-world_test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -set -e -. ../../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 deleted file mode 100644 index 5f2f17f3e52..00000000000 --- a/lowercasing_test/src/tests/hello-world/ref.txt +++ /dev/null @@ -1,6 +0,0 @@ -C++/lib/Hello World -C++/local/Hello World -C++/lib/Hello World -C++/app/Hello World -Java/local/Hello World -Java/jar/HelloWorld |