http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/public_server.h ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/public_server.h b/thirdparty/civetweb-1.9.1/test/public_server.h deleted file mode 100644 index c3e0d8e..0000000 --- a/thirdparty/civetweb-1.9.1/test/public_server.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (c) 2015-2017 the Civetweb developers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -#ifndef TEST_PUBLIC_SERVER_H_ -#define TEST_PUBLIC_SERVER_H_ - -#include "civetweb_check.h" - -Suite *make_public_server_suite(void); - -#endif /* TEST_PUBLIC_H_ */
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/require_test.lua ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/require_test.lua b/thirdparty/civetweb-1.9.1/test/require_test.lua deleted file mode 100644 index 6173dfa..0000000 --- a/thirdparty/civetweb-1.9.1/test/require_test.lua +++ /dev/null @@ -1,2 +0,0 @@ -require 'html_esc' -require 'HugeText' http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/resource_script_demo.lua ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/resource_script_demo.lua b/thirdparty/civetweb-1.9.1/test/resource_script_demo.lua deleted file mode 100644 index e21e465..0000000 --- a/thirdparty/civetweb-1.9.1/test/resource_script_demo.lua +++ /dev/null @@ -1,124 +0,0 @@ --- This is a Lua script that handles sub-resources, e.g. resource_script_demo.lua/path/file.ext - -scriptUri = "resource_script_demo.lua" -envVar = "resource_script_demo_storage" - -resourcedir = os.getenv(envVar) or "R:\\RESOURCEDIR" -method = mg.request_info.request_method:upper() - -if resourcedir then - attr = lfs.attributes(resourcedir) -end - -if (not mg.request_info.uri:find(scriptUri)) or (not resourcedir) or (not attr) or (attr.mode~="directory") then - mg.write("HTTP/1.0 500 OK\r\n") - mg.write("Connection: close\r\n") - mg.write("Content-Type: text/html; charset=utf-8\r\n") - mg.write("\r\n") - mg.write("<html><head><title>Civetweb Lua script resource handling test</title></head>\r\n") - mg.write("<body>\r\nServer error.<br>\r\n") - mg.write("The server admin must make sure this script is available as URI " .. scriptUri .. "<br>\r\n") - mg.write("The server admin must set the environment variable " .. envVar .. " to a directory.<br>\r\n") - mg.write("</body>\r\n</html>\r\n") - return -end -subresource = mg.request_info.uri:match(scriptUri .. "/(.*)") - -if not subresource then - if method=="GET" then - mg.write("HTTP/1.0 200 OK\r\n") - mg.write("Connection: close\r\n") - mg.write("Content-Type: text/html; charset=utf-8\r\n") - mg.write("\r\n") - mg.write("<html><head><title>Civetweb Lua script resource handling test</title></head>\r\n") - mg.write("<body>No resource specified.<br>resourcedir is " .. resourcedir .. "</body></html>\r\n") - else - mg.write("HTTP/1.0 405 Method Not Allowed\r\n") - mg.write("Connection: close\r\n") - mg.write("Content-Type: text/html; charset=utf-8\r\n") - mg.write("\r\n") - mg.write("<html><head><title>Civetweb Lua script resource handling test</title></head>\r\n") - mg.write("<body>Method not allowed.</body></html>\r\n") - end - return -end - - -if method=="GET" then - file = resourcedir .. "/" .. subresource - if lfs.attributes(file) then - mg.send_file(file) - else - mime = mg.get_mime_type(file) - mg.write("HTTP/1.0 404 Not Found\r\n") - mg.write("Connection: close\r\n") - mg.write("Content-Type: text/html; charset=utf-8\r\n") - mg.write("\r\n") - mg.write("<html><head><title>Civetweb Lua script resource handling test</title></head>\r\n") - mg.write("<body>Resource of type \"" .. mime .. "\" not found.</body></html>\r\n") - end - return -end - -if method=="PUT" then - file = resourcedir .. "/" .. subresource - mime = mg.get_mime_type(file) - if lfs.attributes(file) then - mg.write("HTTP/1.0 405 Method Not Allowed\r\n") - mg.write("Connection: close\r\n") - mg.write("Content-Type: text/html; charset=utf-8\r\n") - mg.write("\r\n") - mg.write("<html><head><title>Civetweb Lua script resource handling test</title></head>\r\n") - mg.write("<body>Resource of type \"" .. mime .. "\" already exists.</body></html>\r\n") - else - local f = io.open(file, "w") - - local data = {} - repeat - local l = mg.read(); - data[#data+1] = l; - until ((l == "") or (l == nil)); - - f:write(table.concat(data, "")) - f:close() - mg.write("HTTP/1.0 200 OK\r\n") - mg.write("Connection: close\r\n") - mg.write("Content-Type: text/html; charset=utf-8\r\n") - mg.write("\r\n") - mg.write("<html><head><title>Civetweb Lua script resource handling test</title></head>\r\n") - mg.write("<body>Resource of type \"" .. mime .. "\" created.</body></html>\r\n") - end - return -end - -if method=="DELETE" then - file = resourcedir .. "/" .. subresource - mime = mg.get_mime_type(file) - if lfs.attributes(file) then - os.remove(file) - mg.write("HTTP/1.0 200 OK\r\n") - mg.write("Connection: close\r\n") - mg.write("Content-Type: text/html; charset=utf-8\r\n") - mg.write("\r\n") - mg.write("<html><head><title>Civetweb Lua script resource handling test</title></head>\r\n") - mg.write("<body>Resource of type \"" .. mime .. "\" deleted.</body></html>\r\n") - else - mime = mg.get_mime_type(file) - mg.write("HTTP/1.0 404 Not Found\r\n") - mg.write("Connection: close\r\n") - mg.write("Content-Type: text/html; charset=utf-8\r\n") - mg.write("\r\n") - mg.write("<html><head><title>Civetweb Lua script resource handling test</title></head>\r\n") - mg.write("<body>Resource of type \"" .. mime .. "\" not found.</body></html>\r\n") - end - return -end - --- Any other method -mg.write("HTTP/1.0 405 Method Not Allowed\r\n") -mg.write("Connection: close\r\n") -mg.write("Content-Type: text/html; charset=utf-8\r\n") -mg.write("\r\n") -mg.write("<html><head><title>Civetweb Lua script resource handling test</title></head>\r\n") -mg.write("<body>Method not allowed.</body></html>\r\n") - http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/shared.c ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/shared.c b/thirdparty/civetweb-1.9.1/test/shared.c deleted file mode 100644 index a35a863..0000000 --- a/thirdparty/civetweb-1.9.1/test/shared.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2015-2017 the Civetweb developers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifdef _MSC_VER -#if !defined(_CRT_SECURE_NO_WARNINGS) -#define _CRT_SECURE_NO_WARNINGS -#endif -#if !defined(_CRT_SECURE_NO_DEPRECATE) -#define _CRT_SECURE_NO_DEPRECATE -#endif -#endif - -#include "shared.h" -#include <string.h> - -static char s_test_directory[1024] = {'\0'}; - -const char * -get_test_directory(void) -{ - return s_test_directory; -} - -void -set_test_directory(const char *const path) -{ - strncpy(s_test_directory, - path, - sizeof(s_test_directory) / sizeof(s_test_directory[0])); -} http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/shared.h ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/shared.h b/thirdparty/civetweb-1.9.1/test/shared.h deleted file mode 100644 index 937fcff..0000000 --- a/thirdparty/civetweb-1.9.1/test/shared.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (c) 2015-2017 the Civetweb developers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -#ifndef TEST_SHARED_H_ -#define TEST_SHARED_H_ - -const char *get_test_directory(void); -void set_test_directory(const char *const path); - -#endif /* TEST_SHARED_H_ */ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/ssi_test.shtml ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/ssi_test.shtml b/thirdparty/civetweb-1.9.1/test/ssi_test.shtml deleted file mode 100644 index eb03d17..0000000 --- a/thirdparty/civetweb-1.9.1/test/ssi_test.shtml +++ /dev/null @@ -1,37 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - <meta charset="utf-8"> - <title>The HTML5 Herald</title> - <meta name="author" content="CivetWeb developers"> - <meta name="description" content="CivetWeb Server Side Include (SSI) Test Page"> -</head> - -<body> - <h1>CivetWeb Server Side Include (SSI) Test Page</h1> - <p>Note: Some of the tests below will only work on Windows, others only on Linux, and some probably not on all Linux distributions and all Windows versions.</p> - - <h2>Execute: "cd"</h2> - <!--#exec "cd" --> - <h2>Execute: "pwd"</h2> - <!--#exec "pwd" --> - - <h2>File relative to current document: "hello.txt"</h2> - <!--#include file="hello.txt" --> - <h2>Short form: "hello.txt"</h2> - <!--#include "hello.txt" --> - - <h2>File relative to document root: "hello.txt"</h2> - <!--#include virtual="hello.txt" --> - - <h2>File with absolute path: "C:\Windows\system.ini"</h2> - <!--#include abspath="C:\Windows\system.ini" --> - <h2>File with absolute path: "/etc/issue"</h2> - <!--#include abspath="/etc/issue" --> - - <h2>Nested file relative to current documentt: "hello.shtml"</h2> - <!--#include file="./hello.shtml" --> - -</body> -</html> - http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/syntax_error.ssjs ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/syntax_error.ssjs b/thirdparty/civetweb-1.9.1/test/syntax_error.ssjs deleted file mode 100644 index d8619ed..0000000 --- a/thirdparty/civetweb-1.9.1/test/syntax_error.ssjs +++ /dev/null @@ -1,7 +0,0 @@ - -conn.write('HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\n\r\n'); - -conn.write('Syntax error:'); - -asdf ghjk qwert 123456789 +-*/ -.!,; http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/test.ico ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/test.ico b/thirdparty/civetweb-1.9.1/test/test.ico deleted file mode 100644 index 70ab89d..0000000 Binary files a/thirdparty/civetweb-1.9.1/test/test.ico and /dev/null differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/test.pl ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/test.pl b/thirdparty/civetweb-1.9.1/test/test.pl deleted file mode 100755 index e503489..0000000 --- a/thirdparty/civetweb-1.9.1/test/test.pl +++ /dev/null @@ -1,461 +0,0 @@ -#!/usr/bin/env perl -# This script is used to test Civetweb web server - -use IO::Socket; -use File::Path; -use Cwd; -use strict; -use warnings; -#use diagnostics; - -sub on_windows { $^O =~ /win32/i; } - -my $port = 23456; -my $pid = undef; -my $num_requests; -my $dir_separator = on_windows() ? '\\' : '/'; -my $copy_cmd = on_windows() ? 'copy' : 'cp'; -my $test_dir_uri = "test_dir"; -my $root = 'test'; -my $test_dir = $root . $dir_separator. $test_dir_uri; -my $config = 'civetweb.conf'; -my $exe_ext = on_windows() ? '.exe' : ''; -my $civetweb_exe = '.' . $dir_separator . 'civetweb' . $exe_ext; -my $embed_exe = '.' . $dir_separator . 'embed' . $exe_ext; -my $unit_test_exe = '.' . $dir_separator . 'unit_test' . $exe_ext; -my $exit_code = 0; - -my @files_to_delete = ('debug.log', 'access.log', $config, "$root/a/put.txt", - "$root/a+.txt", "$root/.htpasswd", "$root/binary_file", "$root/a", - "$root/myperl", $embed_exe, $unit_test_exe); - -END { - unlink @files_to_delete; - kill_spawned_child(); - File::Path::rmtree($test_dir); - exit $exit_code; -} - -sub fail { - print "FAILED: @_\n"; - $exit_code = 1; - exit 1; -} - -sub get_num_of_log_entries { - open FD, "access.log" or return 0; - my @lines = (<FD>); - close FD; - return scalar @lines; -} - -# Send the request to the 127.0.0.1:$port and return the reply -sub req { - my ($request, $inc, $timeout) = @_; - my $sock = IO::Socket::INET->new(Proto => 6, - PeerAddr => '127.0.0.1', PeerPort => $port); - fail("Cannot connect to http://127.0.0.1:$port : $!") unless $sock; - $sock->autoflush(1); - foreach my $byte (split //, $request) { - last unless print $sock $byte; - select undef, undef, undef, .001 if length($request) < 256; - } - my ($out, $buf) = ('', ''); - eval { - alarm $timeout if $timeout; - $out .= $buf while (sysread($sock, $buf, 1024) > 0); - alarm 0 if $timeout; - }; - close $sock; - - $num_requests += defined($inc) ? $inc : 1; - my $num_logs = get_num_of_log_entries(); - - unless ($num_requests == $num_logs) { - fail("Request has not been logged: [$request], output: [$out]"); - } - - return $out; -} - -# Send the request. Compare with the expected reply. Fail if no match -sub o { - my ($request, $expected_reply, $message, $num_logs) = @_; - print "==> $message ... "; - my $reply = req($request, $num_logs); - if ($reply =~ /$expected_reply/s) { - print "OK\n"; - } else { -#fail("Requested: [$request]\nExpected: [$expected_reply], got: [$reply]"); - fail("Expected: [$expected_reply], got: [$reply]"); - } -} - -# Spawn a server listening on specified port -sub spawn { - my ($cmdline) = @_; - print 'Executing: ', @_, "\n"; - if (on_windows()) { - my @args = split /\s+/, $cmdline; - my $executable = $args[0]; - Win32::Spawn($executable, $cmdline, $pid); - die "Cannot spawn @_: $!" unless $pid; - } else { - unless ($pid = fork()) { - exec $cmdline; - die "cannot exec [$cmdline]: $!\n"; - } - } - sleep 1; -} - -sub write_file { - open FD, ">$_[0]" or fail "Cannot open $_[0]: $!"; - binmode FD; - print FD $_[1]; - close FD; -} - -sub read_file { - open FD, $_[0] or fail "Cannot open $_[0]: $!"; - my @lines = <FD>; - close FD; - return join '', @lines; -} - -sub kill_spawned_child { - if (defined($pid)) { - kill(9, $pid); - waitpid($pid, 0); - } -} - -####################################################### ENTRY POINT - -unlink @files_to_delete; -$SIG{PIPE} = 'IGNORE'; -$SIG{ALRM} = sub { die "timeout\n" }; -#local $| =1; - -# Make sure we export only symbols that start with "mg_", and keep local -# symbols static. -if ($^O =~ /darwin|bsd|linux/) { - my $out = `(cc -c src/civetweb.c && nm src/civetweb.o) | grep ' T '`; - foreach (split /\n/, $out) { - /T\s+_?mg_.+/ or fail("Exported symbol $_") - } -} - -if (scalar(@ARGV) > 0 and $ARGV[0] eq 'unit') { - do_unit_test(); - exit 0; -} - -# Make sure we load config file if no options are given. -# Command line options override config files settings -write_file($config, "access_log_file access.log\n" . - "listening_ports 127.0.0.1:12345\n"); -spawn("$civetweb_exe -listening_ports 127.0.0.1:$port"); -o("GET /test/hello.txt HTTP/1.0\n\n", 'HTTP/1.1 200 OK', 'Loading config file'); -unlink $config; -kill_spawned_child(); - -# Spawn the server on port $port -my $cmd = "$civetweb_exe ". - "-listening_ports 127.0.0.1:$port ". - "-access_log_file access.log ". - "-error_log_file debug.log ". - "-cgi_environment CGI_FOO=foo,CGI_BAR=bar,CGI_BAZ=baz " . - "-extra_mime_types .bar=foo/bar,.tar.gz=blah,.baz=foo " . - '-put_delete_auth_file test/passfile ' . - '-access_control_list -0.0.0.0/0,+127.0.0.1 ' . - "-document_root $root ". - "-hide_files_patterns **exploit.PL ". - "-enable_keep_alive yes ". - "-url_rewrite_patterns /aiased=/etc/,/ta=$test_dir"; -$cmd .= ' -cgi_interpreter perl' if on_windows(); -spawn($cmd); - -o("GET /hello.txt HTTP/1.1\nConnection: close\nRange: bytes=3-50\r\n\r\n", - 'Content-Length: 15\s', 'Range past the file end'); - -o("GET /hello.txt HTTP/1.1\n\n GET /hello.txt HTTP/1.0\n\n", - 'HTTP/1.1 200.+keep-alive.+HTTP/1.1 200.+close', - 'Request pipelining', 2); - -my $x = 'x=' . 'A' x (200 * 1024); -my $len = length($x); -o("POST /env.cgi HTTP/1.0\r\nContent-Length: $len\r\n\r\n$x", - '^HTTP/1.1 200 OK', 'Long POST'); - -# Try to overflow: Send very long request -req('POST ' . '/..' x 100 . 'ABCD' x 3000 . "\n\n", 0); # don't log this one - -o("GET /hello.txt HTTP/1.0\n\n", 'HTTP/1.1 200 OK', 'GET regular file'); -o("GET /hello.txt HTTP/1.0\nContent-Length: -2147483648\n\n", - 'HTTP/1.1 200 OK', 'Negative content length'); -o("GET /hello.txt HTTP/1.0\n\n", 'Content-Length: 17\s', - 'GET regular file Content-Length'); -o("GET /%68%65%6c%6c%6f%2e%74%78%74 HTTP/1.0\n\n", - 'HTTP/1.1 200 OK', 'URL-decoding'); - -# Break CGI reading after 1 second. We must get full output. -# Since CGI script does sleep, we sleep as well and increase request count -# manually. -my $slow_cgi_reply; -print "==> Slow CGI output ... "; -fail('Slow CGI output forward reply=', $slow_cgi_reply) unless - ($slow_cgi_reply = req("GET /timeout.cgi HTTP/1.0\r\n\r\n", 0, 1)) =~ /Some data/s; -print "OK\n"; -sleep 3; -$num_requests++; - -# '+' in URI must not be URL-decoded to space -write_file("$root/a+.txt", ''); -o("GET /a+.txt HTTP/1.0\n\n", 'HTTP/1.1 200 OK', 'URL-decoding, + in URI'); - -# Test HTTP version parsing -o("GET / HTTPX/1.0\r\n\r\n", '^HTTP/1.1 500', 'Bad HTTP Version', 0); -o("GET / HTTP/x.1\r\n\r\n", '^HTTP/1.1 505', 'Bad HTTP maj Version', 0); -o("GET / HTTP/1.1z\r\n\r\n", '^HTTP/1.1 505', 'Bad HTTP min Version', 0); -o("GET / HTTP/02.0\r\n\r\n", '^HTTP/1.1 505', 'HTTP Version >1.1', 0); - -# File with leading single dot -o("GET /.leading.dot.txt HTTP/1.0\n\n", 'abc123', 'Leading dot 1'); -o("GET /...leading.dot.txt HTTP/1.0\n\n", 'abc123', 'Leading dot 2'); -o("GET /../\\\\/.//...leading.dot.txt HTTP/1.0\n\n", 'abc123', 'Leading dot 3') - if on_windows(); -o("GET .. HTTP/1.0\n\n", '400 Bad Request', 'Leading dot 4', 0); - -mkdir $test_dir unless -d $test_dir; -o("GET /$test_dir_uri/not_exist HTTP/1.0\n\n", - 'HTTP/1.1 404', 'PATH_INFO loop problem'); -o("GET /$test_dir_uri HTTP/1.0\n\n", 'HTTP/1.1 301', 'Directory redirection'); -o("GET /$test_dir_uri/ HTTP/1.0\n\n", 'Modified', 'Directory listing'); -write_file("$test_dir/index.html", "tralala"); -o("GET /$test_dir_uri/ HTTP/1.0\n\n", 'tralala', 'Index substitution'); -o("GET / HTTP/1.0\n\n", 'embed.c', 'Directory listing - file name'); -o("GET /ta/ HTTP/1.0\n\n", 'Modified', 'Aliases'); -o("GET /not-exist HTTP/1.0\r\n\n", 'HTTP/1.1 404', 'Not existent file'); -mkdir $test_dir . $dir_separator . 'x'; -my $path = $test_dir . $dir_separator . 'x' . $dir_separator . 'index.cgi'; -write_file($path, read_file($root . $dir_separator . 'env.cgi')); -chmod(0755, $path); -o("GET /$test_dir_uri/x/ HTTP/1.0\n\n", "Content-Type: text/html\r\n\r\n", - 'index.cgi execution'); - -my $cwd = getcwd(); -o("GET /$test_dir_uri/x/ HTTP/1.0\n\n", - "SCRIPT_FILENAME=$cwd/test/test_dir/x/index.cgi", 'SCRIPT_FILENAME'); -o("GET /ta/x/ HTTP/1.0\n\n", "SCRIPT_NAME=/ta/x/index.cgi", - 'Aliases SCRIPT_NAME'); -o("GET /hello.txt HTTP/1.1\nConnection: close\n\n", 'Connection: close', - 'No keep-alive'); - -$path = $test_dir . $dir_separator . 'x' . $dir_separator . 'a.cgi'; -system("ln -s `which perl` $root/myperl") == 0 or fail("Can't symlink perl"); -write_file($path, "#!../../myperl\n" . - "print \"Content-Type: text/plain\\n\\nhi\";"); -chmod(0755, $path); -o("GET /$test_dir_uri/x/a.cgi HTTP/1.0\n\n", "hi", 'Relative CGI interp path'); -o("GET * HTTP/1.0\n\n", "^HTTP/1.1 404", '* URI'); - -my $mime_types = { - html => 'text/html', - htm => 'text/html', - txt => 'text/plain', - unknown_extension => 'text/plain', - js => 'application/x-javascript', - css => 'text/css', - jpg => 'image/jpeg', - c => 'text/plain', - 'tar.gz' => 'blah', - bar => 'foo/bar', - baz => 'foo', -}; - -foreach my $key (keys %$mime_types) { - my $filename = "_mime_file_test.$key"; - write_file("$root/$filename", ''); - o("GET /$filename HTTP/1.0\n\n", - "Content-Type: $mime_types->{$key}", ".$key mime type"); - unlink "$root/$filename"; -} - -# Get binary file and check the integrity -my $binary_file = 'binary_file'; -my $f2 = ''; -foreach (0..123456) { $f2 .= chr(int(rand() * 255)); } -write_file("$root/$binary_file", $f2); -my $f1 = req("GET /$binary_file HTTP/1.0\r\n\n"); -while ($f1 =~ /^.*\r\n/) { $f1 =~ s/^.*\r\n// } -$f1 eq $f2 or fail("Integrity check for downloaded binary file"); - -my $range_request = "GET /hello.txt HTTP/1.1\nConnection: close\n". -"Range: bytes=3-5\r\n\r\n"; -o($range_request, '206 Partial Content', 'Range: 206 status code'); -o($range_request, 'Content-Length: 3\s', 'Range: Content-Length'); -o($range_request, 'Content-Range: bytes 3-5/17', 'Range: Content-Range'); -o($range_request, '\nple$', 'Range: body content'); - -# Test directory sorting. Sleep between file creation for 1.1 seconds, -# to make sure modification time are different. -mkdir "$test_dir/sort"; -write_file("$test_dir/sort/11", 'xx'); -select undef, undef, undef, 1.1; -write_file("$test_dir/sort/aa", 'xxxx'); -select undef, undef, undef, 1.1; -write_file("$test_dir/sort/bb", 'xxx'); -select undef, undef, undef, 1.1; -write_file("$test_dir/sort/22", 'x'); - -o("GET /$test_dir_uri/sort/?n HTTP/1.0\n\n", - '200 OK.+>11<.+>22<.+>aa<.+>bb<', - 'Directory listing (name, ascending)'); -o("GET /$test_dir_uri/sort/?nd HTTP/1.0\n\n", - '200 OK.+>bb<.+>aa<.+>22<.+>11<', - 'Directory listing (name, descending)'); -o("GET /$test_dir_uri/sort/?s HTTP/1.0\n\n", - '200 OK.+>22<.+>11<.+>bb<.+>aa<', - 'Directory listing (size, ascending)'); -o("GET /$test_dir_uri/sort/?sd HTTP/1.0\n\n", - '200 OK.+>aa<.+>bb<.+>11<.+>22<', - 'Directory listing (size, descending)'); -o("GET /$test_dir_uri/sort/?d HTTP/1.0\n\n", - '200 OK.+>11<.+>aa<.+>bb<.+>22<', - 'Directory listing (modification time, ascending)'); -o("GET /$test_dir_uri/sort/?dd HTTP/1.0\n\n", - '200 OK.+>22<.+>bb<.+>aa<.+>11<', - 'Directory listing (modification time, descending)'); - -unless (scalar(@ARGV) > 0 and $ARGV[0] eq "basic_tests") { - # Check that .htpasswd file existence trigger authorization - write_file("$root/.htpasswd", 'user with space, " and comma:mydomain.com:5deda12442309cbdcdffc6b2737a894f'); - o("GET /hello.txt HTTP/1.1\n\n", '401 Unauthorized', - '.htpasswd - triggering auth on file request'); - o("GET / HTTP/1.1\n\n", '401 Unauthorized', - '.htpasswd - triggering auth on directory request'); - - # Test various funky things in an authentication header. - o("GET /hello.txt HTTP/1.0\nAuthorization: Digest eq== empty=\"\", empty2=, quoted=\"blah foo bar, baz\\\"\\\" more\\\"\", unterminatedquoted=\" doesn't stop\n\n", - '401 Unauthorized', 'weird auth values should not cause crashes'); - my $auth_header = "Digest username=\"user with space, \\\" and comma\", ". - "realm=\"mydomain.com\", nonce=\"1291376417\", uri=\"/\",". - "response=\"e8dec0c2a1a0c8a7e9a97b4b5ea6a6e6\", qop=auth, nc=00000001, cnonce=\"1a49b53a47a66e82\""; - o("GET /hello.txt HTTP/1.0\nAuthorization: $auth_header\n\n", 'HTTP/1.1 200 OK', 'GET regular file with auth'); - o("GET / HTTP/1.0\nAuthorization: $auth_header\n\n", '^(.(?!(.htpasswd)))*$', - '.htpasswd is hidden from the directory list'); - o("GET / HTTP/1.0\nAuthorization: $auth_header\n\n", '^(.(?!(exploit.pl)))*$', - 'hidden file is hidden from the directory list'); - o("GET /.htpasswd HTTP/1.0\nAuthorization: $auth_header\n\n", - '^HTTP/1.1 404 ', '.htpasswd must not be shown'); - o("GET /exploit.pl HTTP/1.0\nAuthorization: $auth_header\n\n", - '^HTTP/1.1 404', 'hidden files must not be shown'); - unlink "$root/.htpasswd"; - - - o("GET /dir%20with%20spaces/hello.cgi HTTP/1.0\n\r\n", - 'HTTP/1.1 200 OK.+hello', 'CGI script with spaces in path'); - o("GET /env.cgi HTTP/1.0\n\r\n", 'HTTP/1.1 200 OK', 'GET CGI file'); - o("GET /bad2.cgi HTTP/1.0\n\n", "HTTP/1.1 123 Please pass me to the client\r", - 'CGI Status code text'); - o("GET /sh.cgi HTTP/1.0\n\r\n", 'shell script CGI', - 'GET sh CGI file') unless on_windows(); - o("GET /env.cgi?var=HELLO HTTP/1.0\n\n", 'QUERY_STRING=var=HELLO', - 'QUERY_STRING wrong'); - o("POST /env.cgi HTTP/1.0\r\nContent-Length: 9\r\n\r\nvar=HELLO", - 'var=HELLO', 'CGI POST wrong'); - o("POST /env.cgi HTTP/1.0\r\nContent-Length: 9\r\n\r\nvar=HELLO", - '\x0aCONTENT_LENGTH=9', 'Content-Length not being passed to CGI'); - o("GET /env.cgi HTTP/1.0\nMy-HdR: abc\n\r\n", - 'HTTP_MY_HDR=abc', 'HTTP_* env'); - o("GET /env.cgi HTTP/1.0\n\r\nSOME_TRAILING_DATA_HERE", - 'HTTP/1.1 200 OK', 'GET CGI with trailing data'); - - o("GET /env.cgi%20 HTTP/1.0\n\r\n", - 'HTTP/1.1 404', 'CGI Win32 code disclosure (%20)'); - o("GET /env.cgi%ff HTTP/1.0\n\r\n", - 'HTTP/1.1 404', 'CGI Win32 code disclosure (%ff)'); - o("GET /env.cgi%2e HTTP/1.0\n\r\n", - 'HTTP/1.1 404', 'CGI Win32 code disclosure (%2e)'); - o("GET /env.cgi%2b HTTP/1.0\n\r\n", - 'HTTP/1.1 404', 'CGI Win32 code disclosure (%2b)'); - o("GET /env.cgi HTTP/1.0\n\r\n", '\nHTTPS=off\n', 'CGI HTTPS'); - o("GET /env.cgi HTTP/1.0\n\r\n", '\nCGI_FOO=foo\n', '-cgi_env 1'); - o("GET /env.cgi HTTP/1.0\n\r\n", '\nCGI_BAR=bar\n', '-cgi_env 2'); - o("GET /env.cgi HTTP/1.0\n\r\n", '\nCGI_BAZ=baz\n', '-cgi_env 3'); - o("GET /env.cgi/a/b/98 HTTP/1.0\n\r\n", 'PATH_INFO=/a/b/98\n', 'PATH_INFO'); - o("GET /env.cgi/a/b/9 HTTP/1.0\n\r\n", 'PATH_INFO=/a/b/9\n', 'PATH_INFO'); - - # Check that CGI's current directory is set to script's directory - my $copy_cmd = on_windows() ? 'copy' : 'cp'; - system("$copy_cmd $root" . $dir_separator . "env.cgi $test_dir" . - $dir_separator . 'env.cgi'); - o("GET /$test_dir_uri/env.cgi HTTP/1.0\n\n", - "CURRENT_DIR=.*$root/$test_dir_uri", "CGI chdir()"); - - # SSI tests - o("GET /ssi1.shtml HTTP/1.0\n\n", - 'ssi_begin.+CFLAGS.+ssi_end', 'SSI #include file='); - o("GET /ssi2.shtml HTTP/1.0\n\n", - 'ssi_begin.+Unit test.+ssi_end', 'SSI #include virtual='); - my $ssi_exec = on_windows() ? 'ssi4.shtml' : 'ssi3.shtml'; - o("GET /$ssi_exec HTTP/1.0\n\n", - 'ssi_begin.+Makefile.+ssi_end', 'SSI #exec'); - my $abs_path = on_windows() ? 'ssi6.shtml' : 'ssi5.shtml'; - my $word = on_windows() ? 'boot loader' : 'root'; - o("GET /$abs_path HTTP/1.0\n\n", - "ssi_begin.+$word.+ssi_end", 'SSI #include abspath'); - o("GET /ssi7.shtml HTTP/1.0\n\n", - 'ssi_begin.+Unit test.+ssi_end', 'SSI #include "..."'); - o("GET /ssi8.shtml HTTP/1.0\n\n", - 'ssi_begin.+CFLAGS.+ssi_end', 'SSI nested #includes'); - - # Manipulate the passwords file - my $path = 'test_htpasswd'; - unlink $path; - system("$civetweb_exe -A $path a b c") == 0 - or fail("Cannot add user in a passwd file"); - system("$civetweb_exe -A $path a b c2") == 0 - or fail("Cannot edit user in a passwd file"); - my $content = read_file($path); - $content =~ /^b:a:\w+$/gs or fail("Bad content of the passwd file"); - unlink $path; - - do_PUT_test(); - kill_spawned_child(); - do_unit_test(); -} - -sub do_PUT_test { - # This only works because civetweb currently doesn't look at the nonce. - # It should really be rejected... - my $auth_header = "Authorization: Digest username=guest, ". - "realm=mydomain.com, nonce=1145872809, uri=/put.txt, ". - "response=896327350763836180c61d87578037d9, qop=auth, ". - "nc=00000002, cnonce=53eddd3be4e26a98\n"; - - o("PUT /a/put.txt HTTP/1.0\nContent-Length: 7\n$auth_header\n1234567", - "HTTP/1.1 201 OK", 'PUT file, status 201'); - fail("PUT content mismatch") - unless read_file("$root/a/put.txt") eq '1234567'; - o("PUT /a/put.txt HTTP/1.0\nContent-Length: 4\n$auth_header\nabcd", - "HTTP/1.1 200 OK", 'PUT file, status 200'); - fail("PUT content mismatch") - unless read_file("$root/a/put.txt") eq 'abcd'; - o("PUT /a/put.txt HTTP/1.0\n$auth_header\nabcd", - "HTTP/1.1 411 Length Required", 'PUT 411 error'); - o("PUT /a/put.txt HTTP/1.0\nExpect: blah\nContent-Length: 1\n". - "$auth_header\nabcd", - "HTTP/1.1 417 Expectation Failed", 'PUT 417 error'); - o("PUT /a/put.txt HTTP/1.0\nExpect: 100-continue\nContent-Length: 4\n". - "$auth_header\nabcd", - "HTTP/1.1 100 Continue.+HTTP/1.1 200", 'PUT 100-Continue'); -} - -sub do_unit_test { - my $target = on_windows() ? 'wi' : 'un'; - system("make $target") == 0 or fail("Unit test failed!"); -} - -print "SUCCESS! All tests passed.\n"; http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/testclient.c ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/testclient.c b/thirdparty/civetweb-1.9.1/test/testclient.c deleted file mode 100644 index 5cc2edb..0000000 --- a/thirdparty/civetweb-1.9.1/test/testclient.c +++ /dev/null @@ -1,151 +0,0 @@ -#include <stdio.h> -#include <time.h> - -#if defined(_WIN32) || defined(WIN32) -#include <windows.h> -void INIT(void) {WSADATA wsaData; WSAStartup(MAKEWORD(2,2), &wsaData);} -#else -#define INIT() -#include <unistd.h> -#include <netdb.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#endif - -int connect_to_server(const struct sockaddr_in * serv_addr) -{ - int sockfd; - - /* Create a socket */ - sockfd = socket(AF_INET, SOCK_STREAM, 0); - if (sockfd < 0) { - perror("ERROR opening socket"); - return -1; - } - - /* Connect to the server */ - if (connect(sockfd, (const sockaddr *)serv_addr, sizeof(*serv_addr)) < 0) { - perror("ERROR connecting"); - close(sockfd); - return -2; - } - - return sockfd; -} - -int send_to_server(int conn, const char * request) -{ - int req_len = strlen(request); - int n; - - n = write(conn, request, req_len); - if (n < 0) { - perror("ERROR writing to socket"); - return 0; - } - - return (n==req_len); -} - -int read_from_server(int conn) -{ - char rbuffer[1024]; - int n; - long ret; - - n = read(conn, rbuffer, sizeof(rbuffer)); - if (n < 0) { - perror("ERROR reading from socket"); - return 0; - } - - if (strncmp("HTTP/1.", rbuffer, 7)) { - perror("ERROR not a HTTP response"); - return 0; - } - - ret = atol(rbuffer + 9); - - return ret; -} - - -int main(int argc, char *argv[]) -{ - long portno; - int i, con_count=1; - time_t t1,t2,t3,t4; - char wbuffer[256]; - int connlist[1024*65]; - int result[1024*65]; - struct hostent *server; - struct sockaddr_in serv_addr; - - INIT(); - - if (argc != 4) { - fprintf(stderr,"Usage:\n\t%s hostname port clients\n\n", argv[0]); - exit(0); - } - - con_count = atol(argv[3]); - if (con_count<1) con_count=1; - if (con_count>1024*65) con_count=1024*65; - - portno = atol(argv[2]); - if (portno<1l || portno>0xFFFFl) { - fprintf(stderr, "ERROR, invalid port\n"); - exit(0); - } - - server = gethostbyname(argv[1]); - if (server == NULL) { - fprintf(stderr, "ERROR, no such host\n"); - exit(0); - } - - memset(&serv_addr, 0, sizeof(serv_addr)); - serv_addr.sin_family = AF_INET; - memcpy(server->h_addr, &serv_addr.sin_addr.s_addr, server->h_length); - serv_addr.sin_port = htons((short)portno); - - sprintf(wbuffer, "GET / HTTP/1.0\r\n\r\n"); - - t1 = time(0); - for (i=0;i<con_count;i++) { - result[i] = connlist[i] = connect_to_server(&serv_addr); - } - t2 = time(0); - for (i=0;i<con_count;i++) { - if (result[i]>=0) { - result[i] = send_to_server(connlist[i], wbuffer); - } - } - t3 = time(0); - for (i=0;i<con_count;i++) { - if (result[i]>=0) { - result[i] = read_from_server(connlist[i]); - } - } - t4 = time(0); - - printf("\n"); - printf("conn: %.0lf\n", difftime(t2,t1)); - printf("write: %.0lf\n", difftime(t3,t2)); - printf("read: %.0lf\n", difftime(t4,t3)); - - for (i=-10;i<1000;i++) { - int j,cnt=0; - for(j=0;j<con_count;j++) { - if (result[j]==i) cnt++; - } - if (cnt>0) { - printf("%5i\t%7i\n", i, cnt); - } - } - - return 0; -} - - http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/timeout.cgi ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/timeout.cgi b/thirdparty/civetweb-1.9.1/test/timeout.cgi deleted file mode 100755 index 3248205..0000000 --- a/thirdparty/civetweb-1.9.1/test/timeout.cgi +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env perl - -# Make stdout unbuffered -use FileHandle; -STDOUT->autoflush(1); - -# This script outputs some content, then sleeps for 5 seconds, then exits. -# Web server should return the content immediately after it is sent, -# not waiting until the script exits. -print "Content-Type: text/html\r\n\r\n"; -print "Some data"; -sleep 3; http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/timertest.c ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/timertest.c b/thirdparty/civetweb-1.9.1/test/timertest.c deleted file mode 100644 index 7a4bdec..0000000 --- a/thirdparty/civetweb-1.9.1/test/timertest.c +++ /dev/null @@ -1,348 +0,0 @@ -/* Copyright (c) 2016-2017 the Civetweb developers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/** - * We include the source file so that we have access to the internal private - * static functions - */ -#ifdef _MSC_VER -#ifndef _CRT_SECURE_NO_WARNINGS -#define _CRT_SECURE_NO_WARNINGS -#endif -#endif - -#if defined(__GNUC__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-function" -#endif - -#define CIVETWEB_API static -#define USE_TIMERS - -#include "../src/civetweb.c" - -#include <stdlib.h> -#include <time.h> - -#include "timertest.h" - -static int action_dec_ret; - -static int -action_dec(void *arg) -{ - int *p = (int *)arg; - (*p)--; - - if (*p < -1) { - ck_abort_msg("Periodic timer called too often"); - /* return 0 here would be unreachable code */ - } - - return (*p >= -3) ? action_dec_ret : 0; -} - - -static int -action_dec_to_0(void *arg) -{ - int *p = (int *)arg; - (*p)--; - - if (*p <= -1) { - ck_abort_msg("Periodic timer called too often"); - /* return 0 here would be unreachable code */ - } - - return (*p > 0); -} - - -START_TEST(test_timer_cyclic) -{ - struct mg_context ctx; - int c[10]; - memset(&ctx, 0, sizeof(ctx)); - memset(c, 0, sizeof(c)); - - action_dec_ret = 1; - - mark_point(); - timers_init(&ctx); - mg_sleep(100); - mark_point(); - - c[0] = 100; - timer_add(&ctx, 0.05, 0.1, 1, action_dec, c + 0); - c[2] = 20; - timer_add(&ctx, 0.25, 0.5, 1, action_dec, c + 2); - c[1] = 50; - timer_add(&ctx, 0.1, 0.2, 1, action_dec, c + 1); - - mark_point(); - - mg_sleep(10000); /* Sleep 10 second - timers will run */ - - mark_point(); - ctx.stop_flag = 99; /* End timer thread */ - mark_point(); - - mg_sleep(2000); /* Sleep 2 second - timers will not run */ - - mark_point(); - - timers_exit(&ctx); - - mark_point(); - - /* If this test runs in a virtual environment, like the CI unit test - * containers, there might be some timing deviations, so check the - * counter with some tolerance. */ - - ck_assert_int_ge(c[0], -1); - ck_assert_int_le(c[0], +1); - ck_assert_int_ge(c[1], -1); - ck_assert_int_le(c[1], +1); - ck_assert_int_ge(c[2], -1); - ck_assert_int_le(c[2], +1); -} -END_TEST - - -START_TEST(test_timer_oneshot_by_callback_retval) -{ - struct mg_context ctx; - int c[10]; - memset(&ctx, 0, sizeof(ctx)); - memset(c, 0, sizeof(c)); - - action_dec_ret = 0; - - mark_point(); - timers_init(&ctx); - mg_sleep(100); - mark_point(); - - c[0] = 10; - timer_add(&ctx, 0, 0.1, 1, action_dec, c + 0); - c[2] = 2; - timer_add(&ctx, 0, 0.5, 1, action_dec, c + 2); - c[1] = 5; - timer_add(&ctx, 0, 0.2, 1, action_dec, c + 1); - - mark_point(); - - mg_sleep(1000); /* Sleep 1 second - timer will run */ - - mark_point(); - ctx.stop_flag = 99; /* End timer thread */ - mark_point(); - - mg_sleep(1000); /* Sleep 1 second - timer will not run */ - - mark_point(); - - timers_exit(&ctx); - - mark_point(); - mg_sleep(100); - - ck_assert_int_eq(c[0], 9); - ck_assert_int_eq(c[1], 4); - ck_assert_int_eq(c[2], 1); -} -END_TEST - - -START_TEST(test_timer_oneshot_by_timer_add) -{ - struct mg_context ctx; - int c[10]; - memset(&ctx, 0, sizeof(ctx)); - memset(c, 0, sizeof(c)); - - action_dec_ret = 1; - - mark_point(); - timers_init(&ctx); - mg_sleep(100); - mark_point(); - - c[0] = 10; - timer_add(&ctx, 0, 0, 1, action_dec, c + 0); - c[2] = 2; - timer_add(&ctx, 0, 0, 1, action_dec, c + 2); - c[1] = 5; - timer_add(&ctx, 0, 0, 1, action_dec, c + 1); - - mark_point(); - - mg_sleep(1000); /* Sleep 1 second - timer will run */ - - mark_point(); - ctx.stop_flag = 99; /* End timer thread */ - mark_point(); - - mg_sleep(1000); /* Sleep 1 second - timer will not run */ - - mark_point(); - - timers_exit(&ctx); - - mark_point(); - mg_sleep(100); - - ck_assert_int_eq(c[0], 9); - ck_assert_int_eq(c[1], 4); - ck_assert_int_eq(c[2], 1); -} -END_TEST - - -START_TEST(test_timer_mixed) -{ - struct mg_context ctx; - int c[10]; - memset(&ctx, 0, sizeof(ctx)); - memset(c, 0, sizeof(c)); - - mark_point(); - timers_init(&ctx); - mg_sleep(100); - mark_point(); - - /* 3 --> 2, because it is a single shot timer */ - c[0] = 3; - timer_add(&ctx, 0, 0, 1, action_dec_to_0, &c[0]); - - /* 3 --> 0, because it will run until c[1] = 0 and then stop */ - c[1] = 3; - timer_add(&ctx, 0, 0.2, 1, action_dec_to_0, &c[1]); - - /* 3 --> 1, with 750 ms period, it will run once at start, - * then once 750 ms later, but not 1500 ms later, since the - * timer is already stopped then. */ - c[2] = 3; - timer_add(&ctx, 0, 0.75, 1, action_dec_to_0, &c[2]); - - /* 3 --> 2, will run at start, but no cyclic in 1 second */ - c[3] = 3; - timer_add(&ctx, 0, 2.5, 1, action_dec_to_0, &c[3]); - - /* 3 --> 3, will not run at start */ - c[4] = 3; - timer_add(&ctx, 2.5, 0.1, 1, action_dec_to_0, &c[4]); - - /* 3 --> 2, an absolute timer in the past (-123.456) will still - * run once at start, and then with the period */ - c[5] = 3; - timer_add(&ctx, -123.456, 2.5, 0, action_dec_to_0, &c[5]); - - /* 3 --> 1, an absolute timer in the past (-123.456) will still - * run once at start, and then with the period */ - c[6] = 3; - timer_add(&ctx, -123.456, 0.75, 0, action_dec_to_0, &c[6]); - - mark_point(); - - mg_sleep(1000); /* Sleep 1 second - timer will run */ - - mark_point(); - ctx.stop_flag = 99; /* End timer thread */ - mark_point(); - - mg_sleep(1000); /* Sleep 1 second - timer will not run */ - - mark_point(); - - timers_exit(&ctx); - - mark_point(); - mg_sleep(100); - - ck_assert_int_eq(c[0], 2); - ck_assert_int_eq(c[1], 0); - ck_assert_int_eq(c[2], 1); - ck_assert_int_eq(c[3], 2); - ck_assert_int_eq(c[4], 3); - ck_assert_int_eq(c[5], 2); - ck_assert_int_eq(c[6], 1); -} -END_TEST - - -Suite * -make_timertest_suite(void) -{ - Suite *const suite = suite_create("Timer"); - - TCase *const tcase_timer_cyclic = tcase_create("Timer Periodic"); - TCase *const tcase_timer_oneshot = tcase_create("Timer Single Shot"); - TCase *const tcase_timer_mixed = tcase_create("Timer Mixed"); - - tcase_add_test(tcase_timer_cyclic, test_timer_cyclic); - tcase_set_timeout(tcase_timer_cyclic, 30); - suite_add_tcase(suite, tcase_timer_cyclic); - - tcase_add_test(tcase_timer_oneshot, test_timer_oneshot_by_timer_add); - tcase_add_test(tcase_timer_oneshot, test_timer_oneshot_by_callback_retval); - tcase_set_timeout(tcase_timer_oneshot, 30); - suite_add_tcase(suite, tcase_timer_oneshot); - - tcase_add_test(tcase_timer_mixed, test_timer_mixed); - tcase_set_timeout(tcase_timer_mixed, 30); - suite_add_tcase(suite, tcase_timer_mixed); - - return suite; -} - - -#ifdef REPLACE_CHECK_FOR_LOCAL_DEBUGGING -/* Used to debug test cases without using the check framework */ - -void -TIMER_PRIVATE(void) -{ - unsigned f_avail; - unsigned f_ret; - -#if defined(_WIN32) - WSADATA data; - WSAStartup(MAKEWORD(2, 2), &data); -#endif - - f_avail = mg_check_feature(0xFF); - f_ret = mg_init_library(f_avail); - ck_assert_uint_eq(f_ret, f_avail); - - test_timer_cyclic(0); - test_timer_oneshot_by_timer_add(0); - test_timer_oneshot_by_callback_retval(0); - test_timer_mixed(0); - - mg_exit_library(); - -#if defined(_WIN32) - WSACleanup(); -#endif -} - -#endif http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/timertest.h ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/timertest.h b/thirdparty/civetweb-1.9.1/test/timertest.h deleted file mode 100644 index 844a01b..0000000 --- a/thirdparty/civetweb-1.9.1/test/timertest.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (c) 2015 the Civetweb developers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -#ifndef TEST_TIMER_H_ -#define TEST_TIMER_H_ - -#include "civetweb_check.h" - -Suite *make_timertest_suite(void); - -#endif /* TEST_TIMER_H_ */ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/websocket.lua ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/websocket.lua b/thirdparty/civetweb-1.9.1/test/websocket.lua deleted file mode 100644 index 7338ed8..0000000 --- a/thirdparty/civetweb-1.9.1/test/websocket.lua +++ /dev/null @@ -1,118 +0,0 @@ -timerID = "timeout" ---timerID = "interval" - -function trace(text) - local f = io.open("websocket.trace", "a") - f:write(os.date() .. " - " .. text .. "\n") - f:close() -end - -function iswebsocket() - return mg.lua_type == "websocket" - --return pcall(function() - -- if (string.upper(mg.request_info.http_headers.Upgrade)~="WEBSOCKET") then error("") end - --end) -end - -trace("called with Lua type " .. tostring(mg.lua_type)) - -if not iswebsocket() then - trace("no websocket") - mg.write("HTTP/1.0 403 Forbidden\r\n") - mg.write("Connection: close\r\n") - mg.write("\r\n") - mg.write("forbidden") - return -end - - --- Serialize table to string -function ser(val) - local t - if type(val) == "table" then - for k,v in pairs(val) do - if t then - t = t .. ", " .. ser(k) .. "=" .. ser(v) - else - t = "{" .. ser(k) .. "=" .. ser(v) - end - end - t = t .. "}" - else - t = tostring(val) - end - return t -end - --- table of all active connection -allConnections = {} - --- function to get a client identification string -function who(tab) - local ri = allConnections[tab.client].request_info - return ri.remote_addr .. ":" .. ri.remote_port -end - --- Callback to accept or reject a connection -function open(tab) - allConnections[tab.client] = tab - trace("open[" .. who(tab) .. "]: " .. ser(tab)) - return true -- return true to accept the connection -end - --- Callback for "Websocket ready" -function ready(tab) - trace("ready[" .. who(tab) .. "]: " .. ser(tab)) - mg.write(tab.client, "text", "Websocket ready") - mg.write(tab.client, 1, "-->h 180"); - mg.write(tab.client, "-->m 180"); - senddata() - if timerID == "timeout" then - mg.set_timeout("timer()", 1) - elseif timerID == "interval" then - mg.set_interval("timer()", 1) - end - return true -- return true to keep the connection open -end - --- Callback for "Websocket received data" -function data(tab) - trace("data[" .. who(tab) .. "]: " .. ser(tab)) - senddata() - return true -- return true to keep the connection open -end - --- Callback for "Websocket is closing" -function close(tab) - trace("close[" .. who(tab) .. "]: " .. ser(tab)) - mg.write("text", "end") - allConnections[tab.client] = nil -end - -function senddata() - local date = os.date('*t'); - local hand = (date.hour%12)*60+date.min; - - mg.write("text", string.format("%u:%02u:%02u", date.hour, date.min, date.sec)); - - if (hand ~= lasthand) then - mg.write(1, string.format("-->h %u", hand*360/(12*60))); - mg.write( string.format("-->m %u", date.min*360/60)); - lasthand = hand; - end - - if bits and content then - data(bits, content) - end -end - -function timer() - trace("timer") - senddata() - if timerID == "timeout" then - mg.set_timeout("timer()", 1) - else - return true -- return true to keep an interval timer running - end -end - http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/websocket.xhtml ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/websocket.xhtml b/thirdparty/civetweb-1.9.1/test/websocket.xhtml deleted file mode 100644 index 3e0828f..0000000 --- a/thirdparty/civetweb-1.9.1/test/websocket.xhtml +++ /dev/null @@ -1,117 +0,0 @@ -<!DOCTYPE HTML> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <meta charset="UTF-8"></meta> - <title>Websocket test</title> - <style type="text/css" media="screen"> - body { background:#eee; margin:0 } - .main { - display:block; border:1px solid #ccc; position:absolute; - top:5%; left:5%; width:90%; height:90%; background:#fff; - } - </style> -</head> -<body> - <script type="text/javascript"><![CDATA[ - - var connection; - var websock_text_field; - var hand_hour; - var hand_min; - - function queryStringElem(name, idx) { - if (typeof(queryStringElem_Table) != "object") { - queryStringElem_Table = {}; - window.location.search.slice(1).split('&').forEach( - function(keyValuePair) { - keyValuePair = keyValuePair.split('='); - if (typeof(queryStringElem_Table[keyValuePair[0]]) != "object") { - queryStringElem_Table[keyValuePair[0]] = []; - } - var idx = queryStringElem_Table[keyValuePair[0]].length+1; - queryStringElem_Table[keyValuePair[0]][idx] = keyValuePair[1] || ''; - } - ); - } - idx = idx || 1; - if (queryStringElem_Table[name]) { - return queryStringElem_Table[name][idx]; - } - return null; - } - - function webSockKeepAlive() { - if (keepAlive) { - connection.send('client still alive'); - console.log('send keep alive') - setTimeout("webSockKeepAlive()", 10000); - } - } - - function load() { - var wsproto = (location.protocol === 'https:') ? "wss:" : "ws:"; - connection = new WebSocket(wsproto + "//" + window.location.host + "/websocket.lua"); - websock_text_field = document.getElementById('websock_text_field'); - hand_min = document.getElementById('hand_min'); - hand_hour = document.getElementById('hand_hour'); - - var ka = queryStringElem("keepAlive"); - if (ka) { - ka = ka.toLowerCase(); - use_keepAlive = (ka!="false") && (ka!="f") && (ka!="no") && (ka!="n") && (ka!=0); - } else { - use_keepAlive = true; - } - - connection.onopen = function () { - keepAlive = use_keepAlive; - webSockKeepAlive(); - }; - - // Log errors - connection.onerror = function (error) { - keepAlive = false; - alert("WebSocket error"); - connection.close(); - }; - - // Log messages from the server - connection.onmessage = function (e) { - var lCmd = e.data.substring(0,3); - if (lCmd == "-->") { - console.log(e.data); - var lDirection = Number(e.data.substring(5)); - if (e.data[3] == 'h') { - hand_hour.setAttribute("transform", "rotate(" + lDirection + " 800 600)"); - } - if (e.data[3] == 'm') { - hand_min.setAttribute("transform", "rotate(" + lDirection + " 800 600)"); - } - } else { - websock_text_field.textContent = e.data; - } - }; - - console.log("load"); - } - - ]]></script> - -<svg class="main" - xmlns="http://www.w3.org/2000/svg" - xmlns:svg="http://www.w3.org/2000/svg" - version="1.1" - xmlns:xlink="http://www.w3.org/1999/xlink" - viewBox="0 0 1600 1200" preserveAspectRatio="xMinYMin meet" - onload="load()" - > - - <circle id="line_a" cx="800" cy="600" r="500" style="stroke:rgb(255,0,0); stroke-width:5; fill:rgb(200,200,200)"/> - <polygon points="800,200 900,300 850,300 850,600 750,600 750,300 700,300" style="fill:rgb(100,0,0)" transform="rotate(0,800,600)" id="hand_hour"/> - <polygon points="800,100 840,200 820,200 820,600 780,600 780,200 760,200" style="fill:rgb(0,100,0)" transform="rotate(0,800,600)" id="hand_min"/> - <text id="websock_text_field" x="800" y="600" text-anchor="middle" font-size="50px" fill="red">No websocket connection yet</text> - -</svg> - -</body> -</html> http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/windows.cgi ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/windows.cgi b/thirdparty/civetweb-1.9.1/test/windows.cgi deleted file mode 100644 index d8aaabc..0000000 --- a/thirdparty/civetweb-1.9.1/test/windows.cgi +++ /dev/null @@ -1,2 +0,0 @@ -#!windows.cgi.cmd - http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/windows.cgi.cmd ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/windows.cgi.cmd b/thirdparty/civetweb-1.9.1/test/windows.cgi.cmd deleted file mode 100644 index 779abad..0000000 --- a/thirdparty/civetweb-1.9.1/test/windows.cgi.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@echo off -@rem echo HTTP/1.1 200 OK -- sent by framework -echo Connection: close -echo. -echo CGI test: -echo. -set http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/windows_fail.cgi ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/windows_fail.cgi b/thirdparty/civetweb-1.9.1/test/windows_fail.cgi deleted file mode 100644 index 606fbd2..0000000 --- a/thirdparty/civetweb-1.9.1/test/windows_fail.cgi +++ /dev/null @@ -1,2 +0,0 @@ -#!r:\windows_fail.cgi.cmd - http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/windows_fail.cgi.cmd ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/windows_fail.cgi.cmd b/thirdparty/civetweb-1.9.1/test/windows_fail.cgi.cmd deleted file mode 100644 index 715c061..0000000 --- a/thirdparty/civetweb-1.9.1/test/windows_fail.cgi.cmd +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -echo Some error sent to stderr 1>&2 http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/windows_fail_silent.cgi ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/windows_fail_silent.cgi b/thirdparty/civetweb-1.9.1/test/windows_fail_silent.cgi deleted file mode 100644 index 198225a..0000000 --- a/thirdparty/civetweb-1.9.1/test/windows_fail_silent.cgi +++ /dev/null @@ -1,2 +0,0 @@ -#!r:\windows_fail_silent.cgi.cmd - http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/windows_fail_silent.cgi.cmd ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/windows_fail_silent.cgi.cmd b/thirdparty/civetweb-1.9.1/test/windows_fail_silent.cgi.cmd deleted file mode 100644 index bb2bf1b..0000000 --- a/thirdparty/civetweb-1.9.1/test/windows_fail_silent.cgi.cmd +++ /dev/null @@ -1,3 +0,0 @@ -@echo off -echo not a complete header -echo and nothing sent to stderr http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/civetweb-1.9.1/test/x.php ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/test/x.php b/thirdparty/civetweb-1.9.1/test/x.php deleted file mode 100644 index cd32842..0000000 --- a/thirdparty/civetweb-1.9.1/test/x.php +++ /dev/null @@ -1,9 +0,0 @@ -<html> - <form method="post"> - <input name="x" type="text" /> - <input type="submit" /> - </form> - - <? echo $_POST["x"]; ?> - -</html> http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/leveldb-1.18/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/thirdparty/leveldb-1.18/CMakeLists.txt b/thirdparty/leveldb-1.18/CMakeLists.txt index 09e72e9..f053739 100755 --- a/thirdparty/leveldb-1.18/CMakeLists.txt +++ b/thirdparty/leveldb-1.18/CMakeLists.txt @@ -184,73 +184,3 @@ install(TARGETS leveldbutil RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) - -##################################### TESTS ####################################### -# Every leveldb test file has to be compiled as an independant binary -# because of the test framework used by leveldb. -add_library(leveldb_test_rt - util/testutil.h - util/testutil.cc - util/testharness.h - util/testharness.cc) - -target_include_directories(leveldb_test_rt - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include -) - -add_custom_target(RUN_LEVELDB_UNIT_TESTS - COMMAND ${CMAKE_CTEST_COMMAND} - --build-config ${CMAKE_CFG_INTDIR} - --output-log LevelDB_test_${CMAKE_CFG_INTDIR}.log - --output-on-failure - --tests-regex leveldb - COMMENT "Running all LevelDB unit tests" -) - -function(LEVELDB_ADD_TEST TESTNAME TESTFILE) - if(NOT TESTNAME) - message(SEND_ERROR "Error: LEVELDB_ADD_TEST called without test name") - return() - endif(NOT TESTNAME) - - if(NOT TESTFILE) - message(SEND_ERROR "Error: LEVELDB_ADD_TEST called without test file") - return() - endif(NOT TESTFILE) - - add_executable(leveldb_${TESTNAME}_test - ${TESTFILE}) - - target_link_libraries(leveldb_${TESTNAME}_test - leveldb_test_rt - leveldb) - - set_target_properties(leveldb_${TESTNAME}_test PROPERTIES - DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) - - add_test(NAME leveldb_${TESTNAME}_test COMMAND leveldb_${TESTNAME}_test) - - add_dependencies(RUN_LEVELDB_UNIT_TESTS leveldb_${TESTNAME}_test) -endfunction(LEVELDB_ADD_TEST) - -LEVELDB_ADD_TEST(env util/env_test.cc) -LEVELDB_ADD_TEST(crc32 util/crc32c_test.cc) -LEVELDB_ADD_TEST(coding util/coding_test.cc) -LEVELDB_ADD_TEST(arena util/arena_test.cc) -LEVELDB_ADD_TEST(cache util/cache_test.cc) -LEVELDB_ADD_TEST(table table/table_test.cc) -# IMPORTANT: Commented a test that fails randomly. -# LEVELDB_ADD_TEST(autocompact db/autocompact_test.cc) -LEVELDB_ADD_TEST(corruption db/corruption_test.cc) -LEVELDB_ADD_TEST(dbformat db/dbformat_test.cc) -LEVELDB_ADD_TEST(filename db/filename_test.cc) -LEVELDB_ADD_TEST(log db/log_test.cc) -LEVELDB_ADD_TEST(skiplist db/skiplist_test.cc) -LEVELDB_ADD_TEST(version_edit db/version_edit_test.cc) -LEVELDB_ADD_TEST(write_batch db/write_batch_test.cc) -LEVELDB_ADD_TEST(version_set db/version_set_test.cc) -LEVELDB_ADD_TEST(filter_block table/filter_block_test.cc) -LEVELDB_ADD_TEST(bloom util/bloom_test.cc) -LEVELDB_ADD_TEST(hash util/hash_test.cc) -LEVELDB_ADD_TEST(db_bench db/db_bench.cc) -LEVELDB_ADD_TEST(db db/db_test.cc) http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/yaml-cpp-yaml-cpp-0.5.3/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/thirdparty/yaml-cpp-yaml-cpp-0.5.3/CMakeLists.txt b/thirdparty/yaml-cpp-yaml-cpp-0.5.3/CMakeLists.txt index d4a8e29..a54c48d 100644 --- a/thirdparty/yaml-cpp-yaml-cpp-0.5.3/CMakeLists.txt +++ b/thirdparty/yaml-cpp-yaml-cpp-0.5.3/CMakeLists.txt @@ -26,8 +26,6 @@ set(YAML_CPP_VERSION_MINOR "5") set(YAML_CPP_VERSION_PATCH "3") set(YAML_CPP_VERSION "${YAML_CPP_VERSION_MAJOR}.${YAML_CPP_VERSION_MINOR}.${YAML_CPP_VERSION_PATCH}") -enable_testing() - ### ### Project options @@ -328,7 +326,6 @@ endif() ### Extras ### if(YAML_CPP_BUILD_TOOLS) - add_subdirectory(test) add_subdirectory(util) endif() http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/CMakeLists.txt b/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/CMakeLists.txt deleted file mode 100644 index 61f1f7f..0000000 --- a/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -set(gtest_force_shared_crt ${MSVC_SHARED_RT} CACHE BOOL - "Use shared (DLL) run-time lib even when Google Test built as a static lib.") -add_subdirectory(gmock-1.7.0) -include_directories(SYSTEM gmock-1.7.0/gtest/include) -include_directories(SYSTEM gmock-1.7.0/include) - -if(WIN32 AND BUILD_SHARED_LIBS) - add_definitions("-DGTEST_LINKED_AS_SHARED_LIBRARY") -endif() - -if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR - "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") - set(yaml_test_flags "-Wno-c99-extensions -Wno-variadic-macros -Wno-sign-compare") -endif() - -file(GLOB test_headers [a-z_]*.h) -file(GLOB test_sources [a-z_]*.cpp integration/[a-z_]*.cpp node/[a-z_]*.cpp) -file(GLOB test_new_api_sources new-api/[a-z]*.cpp) - -list(APPEND test_sources ${test_new_api_sources}) -add_sources(${test_sources} ${test_headers}) - -include_directories(${YAML_CPP_SOURCE_DIR}/test) - -add_executable(run-tests - ${test_sources} - ${test_headers} -) -set_target_properties(run-tests PROPERTIES - COMPILE_FLAGS "${yaml_c_flags} ${yaml_cxx_flags} ${yaml_test_flags}" -) -target_link_libraries(run-tests yaml-cpp gmock) - -add_test(yaml-test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/run-tests) http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/create-emitter-tests.py ---------------------------------------------------------------------- diff --git a/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/create-emitter-tests.py b/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/create-emitter-tests.py deleted file mode 100644 index 7a03c41..0000000 --- a/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/create-emitter-tests.py +++ /dev/null @@ -1,211 +0,0 @@ -import sys -import yaml -import hashlib - -DEFINE = 'YAML_GEN_TESTS' -EVENT_COUNT = 5 - -def encode_stream(line): - for c in line: - if c == '\n': - yield '\\n' - elif c == '"': - yield '\\"' - elif c == '\t': - yield '\\t' - elif ord(c) < 0x20: - yield '\\x' + hex(ord(c)) - else: - yield c - -def encode(line): - return ''.join(encode_stream(line)) - -def doc_start(implicit=False): - if implicit: - return {'emit': '', 'handle': 'OnDocumentStart(_)'} - else: - return {'emit': 'BeginDoc', 'handle': 'OnDocumentStart(_)'} - -def doc_end(implicit=False): - if implicit: - return {'emit': '', 'handle': 'OnDocumentEnd()'} - else: - return {'emit': 'EndDoc', 'handle': 'OnDocumentEnd()'} - -def scalar(value, tag='', anchor='', anchor_id=0): - emit = [] - if tag: - emit += ['VerbatimTag("%s")' % encode(tag)] - if anchor: - emit += ['Anchor("%s")' % encode(anchor)] - if tag: - out_tag = encode(tag) - else: - if value == encode(value): - out_tag = '?' - else: - out_tag = '!' - emit += ['"%s"' % encode(value)] - return {'emit': emit, 'handle': 'OnScalar(_, "%s", %s, "%s")' % (out_tag, anchor_id, encode(value))} - -def comment(value): - return {'emit': 'Comment("%s")' % value, 'handle': ''} - -def seq_start(tag='', anchor='', anchor_id=0, style='_'): - emit = [] - if tag: - emit += ['VerbatimTag("%s")' % encode(tag)] - if anchor: - emit += ['Anchor("%s")' % encode(anchor)] - if tag: - out_tag = encode(tag) - else: - out_tag = '?' - emit += ['BeginSeq'] - return {'emit': emit, 'handle': 'OnSequenceStart(_, "%s", %s, %s)' % (out_tag, anchor_id, style)} - -def seq_end(): - return {'emit': 'EndSeq', 'handle': 'OnSequenceEnd()'} - -def map_start(tag='', anchor='', anchor_id=0, style='_'): - emit = [] - if tag: - emit += ['VerbatimTag("%s")' % encode(tag)] - if anchor: - emit += ['Anchor("%s")' % encode(anchor)] - if tag: - out_tag = encode(tag) - else: - out_tag = '?' - emit += ['BeginMap'] - return {'emit': emit, 'handle': 'OnMapStart(_, "%s", %s, %s)' % (out_tag, anchor_id, style)} - -def map_end(): - return {'emit': 'EndMap', 'handle': 'OnMapEnd()'} - -def gen_templates(): - yield [[doc_start(), doc_start(True)], - [scalar('foo'), scalar('foo\n'), scalar('foo', 'tag'), scalar('foo', '', 'anchor', 1)], - [doc_end(), doc_end(True)]] - yield [[doc_start(), doc_start(True)], - [seq_start()], - [[], [scalar('foo')], [scalar('foo', 'tag')], [scalar('foo', '', 'anchor', 1)], [scalar('foo', 'tag', 'anchor', 1)], [scalar('foo'), scalar('bar')], [scalar('foo', 'tag', 'anchor', 1), scalar('bar', 'tag', 'other', 2)]], - [seq_end()], - [doc_end(), doc_end(True)]] - yield [[doc_start(), doc_start(True)], - [map_start()], - [[], [scalar('foo'), scalar('bar')], [scalar('foo', 'tag', 'anchor', 1), scalar('bar', 'tag', 'other', 2)]], - [map_end()], - [doc_end(), doc_end(True)]] - yield [[doc_start(True)], - [map_start()], - [[scalar('foo')], [seq_start(), scalar('foo'), seq_end()], [map_start(), scalar('foo'), scalar('bar'), map_end()]], - [[scalar('foo')], [seq_start(), scalar('foo'), seq_end()], [map_start(), scalar('foo'), scalar('bar'), map_end()]], - [map_end()], - [doc_end(True)]] - yield [[doc_start(True)], - [seq_start()], - [[scalar('foo')], [seq_start(), scalar('foo'), seq_end()], [map_start(), scalar('foo'), scalar('bar'), map_end()]], - [[scalar('foo')], [seq_start(), scalar('foo'), seq_end()], [map_start(), scalar('foo'), scalar('bar'), map_end()]], - [seq_end()], - [doc_end(True)]] - -def expand(template): - if len(template) == 0: - pass - elif len(template) == 1: - for item in template[0]: - if isinstance(item, list): - yield item - else: - yield [item] - else: - for car in expand(template[:1]): - for cdr in expand(template[1:]): - yield car + cdr - - -def gen_events(): - for template in gen_templates(): - for events in expand(template): - base = list(events) - for i in range(0, len(base)+1): - cpy = list(base) - cpy.insert(i, comment('comment')) - yield cpy - -def gen_tests(): - for events in gen_events(): - name = 'test' + hashlib.sha1(''.join(yaml.dump(event) for event in events)).hexdigest()[:20] - yield {'name': name, 'events': events} - -class Writer(object): - def __init__(self, out): - self.out = out - self.indent = 0 - - def writeln(self, s): - self.out.write('%s%s\n' % (' ' * self.indent, s)) - -class Scope(object): - def __init__(self, writer, name, indent): - self.writer = writer - self.name = name - self.indent = indent - - def __enter__(self): - self.writer.writeln('%s {' % self.name) - self.writer.indent += self.indent - - def __exit__(self, type, value, traceback): - self.writer.indent -= self.indent - self.writer.writeln('}') - -def create_emitter_tests(out): - out = Writer(out) - - includes = [ - 'handler_test.h', - 'yaml-cpp/yaml.h', - 'gmock/gmock.h', - 'gtest/gtest.h', - ] - for include in includes: - out.writeln('#include "%s"' % include) - out.writeln('') - - usings = [ - '::testing::_', - ] - for using in usings: - out.writeln('using %s;' % using) - out.writeln('') - - with Scope(out, 'namespace YAML', 0) as _: - with Scope(out, 'namespace', 0) as _: - out.writeln('') - out.writeln('typedef HandlerTest GenEmitterTest;') - out.writeln('') - tests = list(gen_tests()) - - for test in tests: - with Scope(out, 'TEST_F(%s, %s)' % ('GenEmitterTest', test['name']), 2) as _: - out.writeln('Emitter out;') - for event in test['events']: - emit = event['emit'] - if isinstance(emit, list): - for e in emit: - out.writeln('out << %s;' % e) - elif emit: - out.writeln('out << %s;' % emit) - out.writeln('') - for event in test['events']: - handle = event['handle'] - if handle: - out.writeln('EXPECT_CALL(handler, %s);' % handle) - out.writeln('Parse(out.c_str());') - out.writeln('') - -if __name__ == '__main__': - create_emitter_tests(sys.stdout) http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/CHANGES ---------------------------------------------------------------------- diff --git a/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/CHANGES b/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/CHANGES deleted file mode 100644 index d6f2f76..0000000 --- a/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/CHANGES +++ /dev/null @@ -1,126 +0,0 @@ -Changes for 1.7.0: - -* All new improvements in Google Test 1.7.0. -* New feature: matchers DoubleNear(), FloatNear(), - NanSensitiveDoubleNear(), NanSensitiveFloatNear(), - UnorderedElementsAre(), UnorderedElementsAreArray(), WhenSorted(), - WhenSortedBy(), IsEmpty(), and SizeIs(). -* Improvement: Google Mock can now be built as a DLL. -* Improvement: when compiled by a C++11 compiler, matchers AllOf() - and AnyOf() can accept an arbitrary number of matchers. -* Improvement: when compiled by a C++11 compiler, matchers - ElementsAreArray() can accept an initializer list. -* Improvement: when exceptions are enabled, a mock method with no - default action now throws instead crashing the test. -* Improvement: added class testing::StringMatchResultListener to aid - definition of composite matchers. -* Improvement: function return types used in MOCK_METHOD*() macros can - now contain unprotected commas. -* Improvement (potentially breaking): EXPECT_THAT() and ASSERT_THAT() - are now more strict in ensuring that the value type and the matcher - type are compatible, catching potential bugs in tests. -* Improvement: Pointee() now works on an optional<T>. -* Improvement: the ElementsAreArray() matcher can now take a vector or - iterator range as input, and makes a copy of its input elements - before the conversion to a Matcher. -* Improvement: the Google Mock Generator can now generate mocks for - some class templates. -* Bug fix: mock object destruction triggerred by another mock object's - destruction no longer hangs. -* Improvement: Google Mock Doctor works better with newer Clang and - GCC now. -* Compatibility fixes. -* Bug/warning fixes. - -Changes for 1.6.0: - -* Compilation is much faster and uses much less memory, especially - when the constructor and destructor of a mock class are moved out of - the class body. -* New matchers: Pointwise(), Each(). -* New actions: ReturnPointee() and ReturnRefOfCopy(). -* CMake support. -* Project files for Visual Studio 2010. -* AllOf() and AnyOf() can handle up-to 10 arguments now. -* Google Mock doctor understands Clang error messages now. -* SetArgPointee<> now accepts string literals. -* gmock_gen.py handles storage specifier macros and template return - types now. -* Compatibility fixes. -* Bug fixes and implementation clean-ups. -* Potentially incompatible changes: disables the harmful 'make install' - command in autotools. - -Potentially breaking changes: - -* The description string for MATCHER*() changes from Python-style - interpolation to an ordinary C++ string expression. -* SetArgumentPointee is deprecated in favor of SetArgPointee. -* Some non-essential project files for Visual Studio 2005 are removed. - -Changes for 1.5.0: - - * New feature: Google Mock can be safely used in multi-threaded tests - on platforms having pthreads. - * New feature: function for printing a value of arbitrary type. - * New feature: function ExplainMatchResult() for easy definition of - composite matchers. - * The new matcher API lets user-defined matchers generate custom - explanations more directly and efficiently. - * Better failure messages all around. - * NotNull() and IsNull() now work with smart pointers. - * Field() and Property() now work when the matcher argument is a pointer - passed by reference. - * Regular expression matchers on all platforms. - * Added GCC 4.0 support for Google Mock Doctor. - * Added gmock_all_test.cc for compiling most Google Mock tests - in a single file. - * Significantly cleaned up compiler warnings. - * Bug fixes, better test coverage, and implementation clean-ups. - - Potentially breaking changes: - - * Custom matchers defined using MatcherInterface or MakePolymorphicMatcher() - need to be updated after upgrading to Google Mock 1.5.0; matchers defined - using MATCHER or MATCHER_P* aren't affected. - * Dropped support for 'make install'. - -Changes for 1.4.0 (we skipped 1.2.* and 1.3.* to match the version of -Google Test): - - * Works in more environments: Symbian and minGW, Visual C++ 7.1. - * Lighter weight: comes with our own implementation of TR1 tuple (no - more dependency on Boost!). - * New feature: --gmock_catch_leaked_mocks for detecting leaked mocks. - * New feature: ACTION_TEMPLATE for defining templatized actions. - * New feature: the .After() clause for specifying expectation order. - * New feature: the .With() clause for for specifying inter-argument - constraints. - * New feature: actions ReturnArg<k>(), ReturnNew<T>(...), and - DeleteArg<k>(). - * New feature: matchers Key(), Pair(), Args<...>(), AllArgs(), IsNull(), - and Contains(). - * New feature: utility class MockFunction<F>, useful for checkpoints, etc. - * New feature: functions Value(x, m) and SafeMatcherCast<T>(m). - * New feature: copying a mock object is rejected at compile time. - * New feature: a script for fusing all Google Mock and Google Test - source files for easy deployment. - * Improved the Google Mock doctor to diagnose more diseases. - * Improved the Google Mock generator script. - * Compatibility fixes for Mac OS X and gcc. - * Bug fixes and implementation clean-ups. - -Changes for 1.1.0: - - * New feature: ability to use Google Mock with any testing framework. - * New feature: macros for easily defining new matchers - * New feature: macros for easily defining new actions. - * New feature: more container matchers. - * New feature: actions for accessing function arguments and throwing - exceptions. - * Improved the Google Mock doctor script for diagnosing compiler errors. - * Bug fixes and implementation clean-ups. - -Changes for 1.0.0: - - * Initial Open Source release of Google Mock http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/CMakeLists.txt b/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/CMakeLists.txt deleted file mode 100644 index 572d044..0000000 --- a/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/CMakeLists.txt +++ /dev/null @@ -1,171 +0,0 @@ -######################################################################## -# CMake build script for Google Mock. -# -# To run the tests for Google Mock itself on Linux, use 'make test' or -# ctest. You can select which tests to run using 'ctest -R regex'. -# For more options, run 'ctest --help'. - -# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to -# make it prominent in the GUI. -option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF) - -option(gmock_build_tests "Build all of Google Mock's own tests." OFF) - -# A directory to find Google Test sources. -if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt") - set(gtest_dir gtest) -else() - set(gtest_dir ../gtest) -endif() - -# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build(). -include("${gtest_dir}/cmake/hermetic_build.cmake" OPTIONAL) - -if (COMMAND pre_project_set_up_hermetic_build) - # Google Test also calls hermetic setup functions from add_subdirectory, - # although its changes will not affect things at the current scope. - pre_project_set_up_hermetic_build() -endif() - -######################################################################## -# -# Project-wide settings - -# Name of the project. -# -# CMake files in this project can refer to the root source directory -# as ${gmock_SOURCE_DIR} and to the root binary directory as -# ${gmock_BINARY_DIR}. -# Language "C" is required for find_package(Threads). -project(gmock CXX C) -cmake_minimum_required(VERSION 2.6.2) - -if (COMMAND set_up_hermetic_build) - set_up_hermetic_build() -endif() - -# Instructs CMake to process Google Test's CMakeLists.txt and add its -# targets to the current scope. We are placing Google Test's binary -# directory in a subdirectory of our own as VC compilation may break -# if they are the same (the default). -add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/gtest") - -# Although Google Test's CMakeLists.txt calls this function, the -# changes there don't affect the current scope. Therefore we have to -# call it again here. -config_compiler_and_linker() # from ${gtest_dir}/cmake/internal_utils.cmake - -# Adds Google Mock's and Google Test's header directories to the search path. -include_directories("${gmock_SOURCE_DIR}/include" - "${gmock_SOURCE_DIR}" - "${gtest_SOURCE_DIR}/include" - # This directory is needed to build directly from Google - # Test sources. - "${gtest_SOURCE_DIR}") - -######################################################################## -# -# Defines the gmock & gmock_main libraries. User tests should link -# with one of them. - -# Google Mock libraries. We build them using more strict warnings than what -# are used for other targets, to ensure that Google Mock can be compiled by -# a user aggressive about warnings. -cxx_library(gmock - "${cxx_strict}" - "${gtest_dir}/src/gtest-all.cc" - src/gmock-all.cc) - -cxx_library(gmock_main - "${cxx_strict}" - "${gtest_dir}/src/gtest-all.cc" - src/gmock-all.cc - src/gmock_main.cc) - -######################################################################## -# -# Google Mock's own tests. -# -# You can skip this section if you aren't interested in testing -# Google Mock itself. -# -# The tests are not built by default. To build them, set the -# gmock_build_tests option to ON. You can do it by running ccmake -# or specifying the -Dgmock_build_tests=ON flag when running cmake. - -if (gmock_build_tests) - # This must be set in the root directory for the tests to be run by - # 'make test' or ctest. - enable_testing() - - ############################################################ - # C++ tests built with standard compiler flags. - - cxx_test(gmock-actions_test gmock_main) - cxx_test(gmock-cardinalities_test gmock_main) - cxx_test(gmock_ex_test gmock_main) - cxx_test(gmock-generated-actions_test gmock_main) - cxx_test(gmock-generated-function-mockers_test gmock_main) - cxx_test(gmock-generated-internal-utils_test gmock_main) - cxx_test(gmock-generated-matchers_test gmock_main) - cxx_test(gmock-internal-utils_test gmock_main) - cxx_test(gmock-matchers_test gmock_main) - cxx_test(gmock-more-actions_test gmock_main) - cxx_test(gmock-nice-strict_test gmock_main) - cxx_test(gmock-port_test gmock_main) - cxx_test(gmock-spec-builders_test gmock_main) - cxx_test(gmock_link_test gmock_main test/gmock_link2_test.cc) - cxx_test(gmock_test gmock_main) - - if (CMAKE_USE_PTHREADS_INIT) - cxx_test(gmock_stress_test gmock) - endif() - - # gmock_all_test is commented to save time building and running tests. - # Uncomment if necessary. - # cxx_test(gmock_all_test gmock_main) - - ############################################################ - # C++ tests built with non-standard compiler flags. - - cxx_library(gmock_main_no_exception "${cxx_no_exception}" - "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) - - cxx_library(gmock_main_no_rtti "${cxx_no_rtti}" - "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) - - cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}" - "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) - - cxx_test_with_flags(gmock-more-actions_no_exception_test "${cxx_no_exception}" - gmock_main_no_exception test/gmock-more-actions_test.cc) - - cxx_test_with_flags(gmock_no_rtti_test "${cxx_no_rtti}" - gmock_main_no_rtti test/gmock-spec-builders_test.cc) - - cxx_test_with_flags(gmock_use_own_tuple_test "${cxx_use_own_tuple}" - gmock_main_use_own_tuple test/gmock-spec-builders_test.cc) - - cxx_shared_library(shared_gmock_main "${cxx_default}" - "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) - - # Tests that a binary can be built with Google Mock as a shared library. On - # some system configurations, it may not possible to run the binary without - # knowing more details about the system configurations. We do not try to run - # this binary. To get a more robust shared library coverage, configure with - # -DBUILD_SHARED_LIBS=ON. - cxx_executable_with_flags(shared_gmock_test_ "${cxx_default}" - shared_gmock_main test/gmock-spec-builders_test.cc) - set_target_properties(shared_gmock_test_ - PROPERTIES - COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1") - - ############################################################ - # Python tests. - - cxx_executable(gmock_leak_test_ test gmock_main) - py_test(gmock_leak_test) - - cxx_executable(gmock_output_test_ test gmock) - py_test(gmock_output_test) -endif() http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/CONTRIBUTORS ---------------------------------------------------------------------- diff --git a/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/CONTRIBUTORS b/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/CONTRIBUTORS deleted file mode 100644 index 6e9ae36..0000000 --- a/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/CONTRIBUTORS +++ /dev/null @@ -1,40 +0,0 @@ -# This file contains a list of people who've made non-trivial -# contribution to the Google C++ Mocking Framework project. People -# who commit code to the project are encouraged to add their names -# here. Please keep the list sorted by first names. - -Benoit Sigoure <[email protected]> -Bogdan Piloca <[email protected]> -Chandler Carruth <[email protected]> -Dave MacLachlan <[email protected]> -David Anderson <[email protected]> -Dean Sturtevant -Gene Volovich <[email protected]> -Hal Burch <[email protected]> -Jeffrey Yasskin <[email protected]> -Jim Keller <[email protected]> -Joe Walnes <[email protected]> -Jon Wray <[email protected]> -Keir Mierle <[email protected]> -Keith Ray <[email protected]> -Kostya Serebryany <[email protected]> -Lev Makhlis -Manuel Klimek <[email protected]> -Mario Tanev <[email protected]> -Mark Paskin -Markus Heule <[email protected]> -Matthew Simmons <[email protected]> -Mike Bland <[email protected]> -Neal Norwitz <[email protected]> -Nermin Ozkiranartli <[email protected]> -Owen Carlsen <[email protected]> -Paneendra Ba <[email protected]> -Paul Menage <[email protected]> -Piotr Kaminski <[email protected]> -Russ Rufer <[email protected]> -Sverre Sundsdal <[email protected]> -Takeshi Yoshino <[email protected]> -Vadim Berman <[email protected]> -Vlad Losev <[email protected]> -Wolfgang Klier <[email protected]> -Zhanyong Wan <[email protected]> http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c1101f46/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/LICENSE ---------------------------------------------------------------------- diff --git a/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/LICENSE b/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/LICENSE deleted file mode 100644 index 1941a11..0000000 --- a/thirdparty/yaml-cpp-yaml-cpp-0.5.3/test/gmock-1.7.0/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
