Pārlūkot izejas kodu

Merge remote-tracking branch 'upstream/0.2'

Stefan Profanter 7 gadi atpakaļ
vecāks
revīzija
194cb8968c
5 mainītis faili ar 42 papildinājumiem un 26 dzēšanām
  1. 1 1
      .travis.yml
  2. 3 3
      FEATURES.md
  3. 2 2
      README.md
  4. 8 0
      tools/amalgamate.py
  5. 28 20
      tools/travis/travis_osx_script.sh

+ 1 - 1
.travis.yml

@@ -6,7 +6,7 @@ compiler:
 
 os:
 - linux
-# - osx
+- osx
 
 # use new build environment (docker)
 dist: trusty

+ 3 - 3
FEATURES.md

@@ -5,7 +5,7 @@ open62541 Supported Features
 |:----------------------------|:--------------------------------|:--------------------:|:---------------------|
 | Discovery Service Set       |                                 |                      |                      |
 |                             | FindServers()                   |  :white_check_mark:  |                      |
-|                             | FindServersOnNetwork()          | :first_quarter_moon: | Branch: feature_mdns |
+|                             | FindServersOnNetwork()          |     :full_moon:      | Branch: master       |
 |                             | GetEndpoints()                  |  :white_check_mark:  |                      |
 |                             | RegisterServer()                |  :white_check_mark:  |                      |
 |                             | RegisterServer2()               |     :full_moon:      | Branch: master       |
@@ -92,6 +92,6 @@ open62541 Supported Features
 | Method call                             |  :white_check_mark:  |                      |
 | Advanced Type                           |  :white_check_mark:  |                      |
 | **Discovery**                           |                      | See Discovery Service Set |
-| Local Disovery Server                   | :first_quarter_moon: | Branch: feature_mdns |
-| Local Discovery Server Multicast Ext.   | :first_quarter_moon: | Branch: feature_mdns |
+| Local Disovery Server                   |     :full_moon:      | Branch: master       |
+| Local Discovery Server Multicast Ext.   |     :full_moon:      | Branch: master       |
 | Global Discovery Server                 |      :new_moon:      |                      |

+ 2 - 2
README.md

@@ -9,7 +9,7 @@ The library is [available](https://github.com/open62541/open62541/releases) in s
 
 [![Ohloh Project Status](https://www.ohloh.net/p/open62541/widgets/project_thin_badge.gif)](https://www.ohloh.net/p/open62541)
 [![Build Status](https://travis-ci.org/open62541/open62541.png?branch=0.2)](https://travis-ci.org/open62541/open62541)
-[![MSVS build status](https://ci.appveyor.com/api/projects/status/kkxppc28ek5t6yk8/branch/0.2?svg=true)](https://ci.appveyor.com/project/Stasik0/open62541/branch/0.2)
+[![MSVS build status](https://ci.appveyor.com/api/projects/status/kkxppc28ek5t6yk8/branch/0.2?svg=true)](https://ci.appveyor.com/project/open62541/open62541/branch/0.2)
 [![Coverage Status](https://coveralls.io/repos/open62541/open62541/badge.png?branch=0.2)](https://coveralls.io/r/open62541/open62541?branch=0.2)
 [![Coverity Scan Build Status](https://scan.coverity.com/projects/1864/badge.svg)](https://scan.coverity.com/projects/1864)
 
@@ -42,7 +42,7 @@ Features still missing in the 0.2 release are:
 ### Using open62541
 A general introduction to OPC UA and the open62541 documentation can be found at http://open62541.org/doc/current.
 Past releases of the library can be downloaded at https://github.com/open62541/open62541/releases.
-To use the latest improvements, download a nightly build of the *single-file distribution* (the entire library merged into a single source and header file) from http://open62541.org/releases. Nightly builds of MSVC binaries of the library are available [here](https://ci.appveyor.com/project/Stasik0/open62541/build/artifacts).
+To use the latest improvements, download a nightly build of the *single-file distribution* (the entire library merged into a single source and header file) from http://open62541.org/releases. Nightly builds of MSVC binaries of the library are available [here](https://ci.appveyor.com/project/open62541/open62541/build/artifacts).
 
 For discussion and help, you can use
 - the [mailing list](https://groups.google.com/d/forum/open62541)

+ 8 - 0
tools/amalgamate.py

@@ -69,6 +69,9 @@ for fname in args.inputs:
             guard_res = guard_re.match(line)
             if not inc_res and not guard_res:
                 file.write(line)
+                # Ensure file is written to disk.
+                file.flush()
+                os.fsync(file.fileno())
         print ("done."),
 
 if not is_c:
@@ -78,6 +81,11 @@ if not is_c:
 #endif
 
 #endif /* %s */\n''' % (outname.upper() + u"_H_"))
+
+# Ensure file is written to disk.
+# See https://stackoverflow.com/questions/13761961/large-file-not-flushed-to-disk-immediately-after-calling-close
+file.flush()
+os.fsync(file.fileno())
 file.close()
 
 print ("The size of "+args.outfile+" is "+ str(os.path.getsize(args.outfile))+" Bytes.")

+ 28 - 20
tools/travis/travis_osx_script.sh

@@ -6,41 +6,49 @@ if [ $ANALYZE = "true" ]; then
     exit 0
 else
     echo "\n=== Building ==="
+    export OPENSSL_ROOT_DIR="/usr/local/opt/openssl"
+    export PATH="/Users/travis/Library/Python/2.7/bin:$PATH"
 
-    echo "Create certificate for OS X build"
+
+    echo "Documentation and certificate build"  && echo -en 'travis_fold:start:script.build.doc\\r'
     mkdir -p build && cd build
-    cmake -DCMAKE_BUILD_TYPE=Release -DUA_BUILD_SELFSIGNED_CERTIFICATE=ON ..
+    cmake -DCMAKE_BUILD_TYPE=Release -DUA_BUILD_EXAMPLES=ON -DUA_BUILD_DOCUMENTATION=ON -DUA_BUILD_SELFSIGNED_CERTIFICATE=ON ..
     make selfsigned
-    cp server_cert.der ../
+    ls examples
+    cp examples/server_cert.der ../
     cd .. && rm -rf build
+    echo -en 'travis_fold:end:script.build.doc\\r'
 
-    echo "Compile release build for OS X"
-    mkdir -p build && cd build
-    cmake -DCMAKE_BUILD_TYPE=Release -DUA_ENABLE_AMALGAMATION=ON -DUA_BUILD_EXAMPLES=ON -DUA_BUILD_DOCUMENTATION=ON -DUA_GENERATE_SELFSIGNED=ON ..
-    make -j8
-    tar -pczf open62541-osx.tar.gz ../doc ../server_cert.der ../LICENSE ../AUTHORS ../README.md ./bin/examples/server ./bin/examples/client ./bin/libopen62541.a open62541.h open62541.c
-    cp open62541-osx.tar.gz ..
-    cp open62541.h .. #copy single file-release
-    cp open62541.c .. #copy single file-release
+    echo "Full Namespace 0 Generation"  && echo -en 'travis_fold:start:script.build.ns0\\r'
+    mkdir -p build
+    cd build
+    cmake -DCMAKE_BUILD_TYPE=Debug -DUA_ENABLE_GENERATE_NAMESPACE0=On -DUA_BUILD_EXAMPLES=ON  ..
+    make -j
     cd .. && rm -rf build
+    echo -en 'travis_fold:end:script.build.ns0\\r'
 
-    echo "Compile multithreaded version"
+    echo "Compile release build for OS X" && echo -en 'travis_fold:start:script.build.osx\\r'
     mkdir -p build && cd build
-    cmake -DUA_ENABLE_MULTITHREADING=ON -DUA_BUILD_EXAMPLES=ON ..
+	cmake -DCMAKE_BUILD_TYPE=Release -DUA_ENABLE_AMALGAMATION=ON -DUA_BUILD_EXAMPLES=ON ..
     make -j
+    tar -pczf open62541-osx.tar.gz ../LICENSE ../AUTHORS ../README.md examples/server examples/client libopen62541.a open62541.h open62541.c
+    cp open62541-osx.tar.gz ..
+    cp open62541.h .. #copy single file-release
+    cp open62541.c .. #copy single file-release
     cd .. && rm -rf build
+	echo -en 'travis_fold:end:script.build.osx\\r'
 
-    echo "Compile without discovery version"
+    echo "Compile multithreaded version" && echo -en 'travis_fold:start:script.build.multithread\\r'
     mkdir -p build && cd build
-    cmake -DUA_ENABLE_DISCOVERY=OFF -DUA_BUILD_EXAMPLES=ON ..
+    cmake -DUA_ENABLE_MULTITHREADING=ON -DUA_BUILD_EXAMPLESERVER=ON -DUA_BUILD_EXAMPLES=ON ..
     make -j
     cd .. && rm -rf build
+	echo -en 'travis_fold:end:script.build.multithread\\r'
 
-    echo "Debug build and unit tests (64 bit)"
+    echo "Debug build and unit tests with valgrind" && echo -en 'travis_fold:start:script.build.unit_test\\r'
     mkdir -p build && cd build
-    cmake -DCMAKE_BUILD_TYPE=Debug -DUA_BUILD_DEMO_NODESET=ON -DUA_BUILD_UNIT_TESTS=ON -DUA_BUILD_EXAMPLES=ON -DUA_ENABLE_COVERAGE=ON ..
-    make -j8 && make test
-    echo "Run valgrind to see if the server leaks memory (just starting up and closing..)"
-    (valgrind --error-exitcode=3 ./bin/server & export pid=$!; sleep 2; kill -INT $pid; wait $pid);
+    cmake -DCMAKE_BUILD_TYPE=Debug -DUA_BUILD_EXAMPLES=ON -DUA_BUILD_UNIT_TESTS=ON -DUA_ENABLE_COVERAGE=OFF -DUA_ENABLE_VALGRIND_UNIT_TESTS=OFF ..
+    make -j && make test ARGS="-V"
     cd .. && rm -rf build
+	echo -en 'travis_fold:end:script.build.unit_test\\r'
 fi