CentOS 7 tests
fix tests in centos 7 issue #36
first draft of windows tests #37 (performances not satisfactory/sw doesn't compile)
| | |
| | | language: cpp |
| | | services: docker |
| | | |
| | | matrix: |
| | | include: |
| | | - os: linux |
| | | dist: bionic |
| | | name: "Ubuntu 18.04 - Travis CI VM" |
| | | addons: |
| | | apt: |
| | | packages: |
| | |
| | | - libboost-date-time-dev |
| | | - os: linux |
| | | dist: xenial |
| | | name: "Ubuntu 16.04 - Travis CI VM" |
| | | addons: |
| | | apt: |
| | | packages: |
| | |
| | | - libboost-thread-dev |
| | | - libboost-date-time-dev |
| | | |
| | | - os: linux |
| | | dist: bionic |
| | | name: "CentOS-7 Docker" |
| | | before_script: |
| | | - docker run --name centos7_toconfigure -v `pwd`:/root/open-license-manager centos:centos7 /bin/bash -c |
| | | "yum -y update && yum -y install cmake boost boost-devel boost-static openssl openssl-devel gcc-c++ valgrind valgrind-devel glibc-static centos-release-scl-rh && |
| | | yum -y install devtoolset-3-gcc devtoolset-3-gcc-c++ && cd /root/open-license-manager && mkdir build && cd build && |
| | | CC=/opt/rh/devtoolset-3/root/usr/bin/gcc XX=/opt/rh/devtoolset-3/root/usr/bin/g++ cmake .." |
| | | - docker commit centos7_toconfigure centos7_configured |
| | | script: |
| | | - docker run --name centos7_make -v `pwd`:/root/open-license-manager centos7_configured /bin/bash -c |
| | | "cd /root/open-license-manager/build && make && make install && CTEST_OUTPUT_ON_FAILURE=1 VIRT_ENV=CONTAINER make test" |
| | | |
| | | - os: windows |
| | | name: "Widnows server 1803 - Visual Studio 15 2017 Win64" |
| | | cache: |
| | | directories: |
| | | - "/C/local/boost" |
| | | before_script: |
| | | - ./windows_travis.bat |
| | | - cd "/C/Users/travis/build/open-license-manager/open-license-manager" |
| | | - mkdir build |
| | | - cd build && cmake -G "Visual Studio 15 2017 Win64" -T "host=x64" -DBOOST_ROOT="C:/local/boost" -DCMAKE_INSTALL_PREFIX=../../install .. |
| | | script: |
| | | - true |
| | | # - PATH="/C/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin":$PATH |
| | | # - MSBuild.exe "license++.sln" |
| | | # - ctest |
| | | # - cmake -T "host=x64" -DBOOST_ROOT="C:/local/boost" -DCMAKE_INSTALL_PREFIX=../../install --build .. --target RUN_TESTS |
| | | |
| | | before_script: |
| | | - mkdir build |
| | | - cd build && cmake -DCMAKE_INSTALL_PREFIX=../../install .. |
| | | |
| | | |
| | | script: |
| | | - make |
| | | - make install |
| | | - make test |
| | | - CTEST_OUTPUT_ON_FAILURE=1 make test |
| | | |
| | |
| | | #TODO guess address_model 64 in boost |
| | | #fix shared libraries activation |
| | | |
| | | #cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) |
| | | cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR) |
| | | |
| | | #version variables, major and minor must be 1 character only |
| | |
| | | |
| | | SET(CMAKE_DISABLE_SOURCE_CHANGES ON) |
| | | SET(CMAKE_DISABLE_IN_SOURCE_BUILD ON) |
| | | SET(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "CMake verbose" FORCE) |
| | | SET(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "CMake verbose") |
| | | |
| | | project (license++ C CXX) |
| | | SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) |
New file |
| | |
| | | Contributing to Open License Manager |
| | | ========== |
| | | :+1::tada: First off, if you landed here means you want to contribute! :tada::+1: |
| | | |
| | | The following is a set of guidelines for contributing to Open License Manager and its packages, which are hosted in the [Open License Manager organization](https://github.com/open-license-manager) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. |
| | | |
| | | ## How Can I Contribute? |
| | | |
| | | ### Reporting Bugs |
| | | |
| | | This section guides you through submitting a bug report for Open License Manager. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer: :computer:, and find related reports :mag_right:. |
| | | |
| | | Before creating bug reports, please [check the repository](https://github.com/open-license-manager/open-license-manager/issues) to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). |
| | | |
| | | #### How Do I Submit A (Good) Bug Report? |
| | | |
| | | Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Explain the problem and include additional details to help maintainers reproduce the problem: |
| | | |
| | | * **Use a clear and descriptive title** for the issue to identify the problem. |
| | | * **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining how are you using Open License Manager. |
| | | * **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines). |
| | | * **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior. |
| | | * **Explain which behavior you expected to see instead and why.** |
| | | * **If you're reporting that Open License Manager crashed**, include a crash dump and the associated message. |
| | | * **Label the issue as bug.** |
| | | |
| | | Provide more context by answering these questions: |
| | | |
| | | * **Can you reproduce the problem using the example application?** |
| | | * **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens. |
| | | * If the problem is related integrating Open License Manager with your application, **produce a minimal example to demonstrate it** Does the problem happen only with some license type? Does the problem only happen in Linux/Docker/Windows? |
| | | |
| | | Include details about your configuration and environment: |
| | | |
| | | * **Update Open License Manager to the latest version** If possible try to pull the latest changes from master branch. |
| | | * **What's the name and version of the OS you're using**? |
| | | * **What's the name and version of the compiler you're using**? Are you cross compiling? |
| | | * **Are you running Open License Manager in a virtual machine/docker?** If so, which VM software are you using and which operating systems and versions are used for the host and the guest? |
| | | |
| | | ### Suggesting Enhancements |
| | | |
| | | This section guides you through submitting an enhancement suggestion for Open License Manager, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:. |
| | | |
| | | |
| | | Before creating enhancement suggestions, please check [existing enhancement request](https://github.com/open-license-manager/open-license-manager/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Aenhancement) to see if the enhancement has already been suggested, as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). |
| | | |
| | | #### How Do I Submit A (Good) Enhancement Suggestion? |
| | | |
| | | Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). |
| | | |
| | | * **Use a clear and descriptive title** for the issue to identify the suggestion. |
| | | * **Provide a detailed description of the suggested enhancement** in as many details as possible. |
| | | * **Provide specific examples to demonstrate the steps**. Include copy/pasteable snippets of code which we could use, or reference to other libraries, algorithms, open source code. |
| | | * **Describe the current behavior** and **explain which behavior you expected to see instead** and why. |
| | | * **Explain why this enhancement would be useful** to most Open License Manager users and isn't something that can or should be implemented. |
| | | * **List some other software protection where this enhancement exists.** |
| | | * **Specify the name and version of the OS you're proposing the enhancement for.** If applicable include all the environment informations: is this for running the application in a VM? in a Docker? |
| | | * **Specify the version of the .** |
| | | * **Label the issue as enhancement.** |
| | | |
| | | ### Your First Code Contribution |
| | | |
| | | Unsure where to begin contributing to Open License Manager? You can start by looking through the `[good first issue](https://github.com/open-license-manager/open-license-manager/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)` and `[help-wanted](https://github.com/open-license-manager/open-license-manager/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)` issues. |
| | | |
| | | You can have a look to the project upcoming milestones to see what's going to be implemented soon. If you decide to contribute on an issue scheduled in next milestone, comment on the issue first. If the issue is already "assigned" means there is already some work done for it we may have not pushed it yet. |
| | | |
| | | If you have already forked the repository to implement a specific feature, and you want your code to be merged in the main repository please first file an enhancement request as explained in [suggesting enhancements](#suggesting-enhancements). If you found a bug and you want to propose a fix please [report a bug](#reporting-bugs) before. |
| | | |
| | | #### General coding rules |
| | | |
| | | Supposing you already know how to contribute to an open source project on GitHub (if you have doubts you can check this short [guide](https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project) ), you're working on an existing issue the code is already committed on your fork. |
| | | |
| | | * Ensure your feature branch is up to date with the master, eventually merge the latest changes from the master. This will help us save time in the merge. |
| | | * ~~ Reformat the changed code using "clang-format" to keep consistent formatting style ~~ (not yet). |
| | | * Prepare your pull request, in the pull request comment reference the issue the pull request will fix. |
| | | * Check your pull request compiles and pass the tests on Travis CI |
| | | * Comment on the issue you want to fix. |
| | | |
| | | ##### Don't |
| | | * Don't reformat the code following your personal likes, it introduce a lot of "noise" and makes very hard to merge. |
| | | * Very large pull requests with few comments, no corresponding issue will probably be rejected. |
| | | * We understand that the project is still in a very alpha stage and a rearrangement is possible and needed, however we would like to discuss it with you before we take project changing decision. |
| | | * We can't break current functionality, user established habits without documenting the change. |
| | | |
| | | #Funny facts |
| | | |
| | | ### Project general context (is the project still maintained?) |
| | | |
| | | This project started as a week-end project, donated and almost abandoned. Thanks to the effort of some people that are using it, and to the help of many of you it has been kept alive (2019). |
| | | |
| | | The most challenging aspect is the number of environment/libraries we must work with. We're trying to set up automated tests on Travis CI to help contributors to verify their code automatically in conditions they've not thought about. |
| | | |
| | | |
| | | ### Open License Manager and "the community" |
| | | |
| | | Open License Manager has a very strange relationship with "the community", its aim is to protect proprietary software from unintended usage. But out there, there are people that think that all the software should be licensed as AGPL... Thus StackOverflow and its fellow sites turned out to be not a collaborative place to ask questions about software protection. Try if you want, but to choose your words carefully. :speak_no_evil: |
| | |
| | | #ifndef DATATYPES_H_ |
| | | #define DATATYPES_H_ |
| | | |
| | | /* |
| | | * This include file is the public api di License++ |
| | | * You should include this file if your software don't plan to use |
| | | * the part of the library dealing with features. |
| | | * Otherwise licensepp-features.h should be included. |
| | | */ |
| | | #ifdef __cplusplus |
| | | extern "C" { |
| | | #endif |
| | |
| | | #define PC_IDENTIFIER_SIZE 18 |
| | | #define PROPRIETARY_DATA_SIZE 16 |
| | | |
| | | #define LICENESE_INT_VERSION 100 |
| | | #define LICENSEPP_VERSION "1.0.0" |
| | | #define LICENESE_INT_VERSION 110 |
| | | #define LICENSEPP_VERSION "1.1.0" |
| | | |
| | | typedef enum { |
| | | LICENSE_OK = 0, //OK |
| | |
| | | } else if (family == AF_PACKET && ifa->ifa_data != NULL) { |
| | | struct sockaddr_ll *s1 = (struct sockaddr_ll*) ifa->ifa_addr; |
| | | if (adapterInfos != NULL && if_name_position < *adapter_info_size) { |
| | | for (int i = 0; i < 6; i++) { |
| | | int i; |
| | | for (i = 0; i < 6; i++) { |
| | | adapterInfos[if_name_position].mac_address[i] = |
| | | s1->sll_addr[i]; |
| | | #ifdef _DEBUG |
| | |
| | | memset(tmpDrives, 0, sizeof(DiskInfo) * maxDrives); |
| | | statDrives = (__ino64_t *) malloc(maxDrives * sizeof(__ino64_t )); |
| | | memset(statDrives, 0, sizeof(__ino64_t ) * maxDrives); |
| | | ; |
| | | |
| | | aFile = setmntent("/proc/mounts", "r"); |
| | | if (aFile == NULL) { |
| | |
| | | if (drive_found == -1) { |
| | | LOG_DEBUG("mntent: %s %s %d\n", ent->mnt_fsname, ent->mnt_dir, |
| | | (unsigned long int)mount_stat.st_ino); |
| | | strncpy(tmpDrives[currentDrive].device, ent->mnt_fsname, 255-1); |
| | | strncpy(tmpDrives[currentDrive].device, ent->mnt_fsname, |
| | | 255 - 1); |
| | | statDrives[currentDrive] = mount_stat.st_ino; |
| | | drive_found = currentDrive; |
| | | currentDrive++; |
| | |
| | | if (diskInfos == NULL) { |
| | | *disk_info_size = currentDrive; |
| | | free(tmpDrives); |
| | | result = FUNC_RET_OK; |
| | | result = (currentDrive > 0) ? FUNC_RET_OK : FUNC_RET_NOT_AVAIL; |
| | | } else if (*disk_info_size >= currentDrive) { |
| | | disk_by_uuid_dir = opendir("/dev/disk/by-uuid"); |
| | | if (disk_by_uuid_dir == NULL) { |
| | |
| | | return FUNC_RET_OK; |
| | | } |
| | | |
| | | //0=NO 1=Docker/Lxc |
| | | static int checkContainerProc() { |
| | | //in docer /proc/self/cgroups contains the "docker" or "lxc" string |
| | | //https://stackoverflow.com/questions/23513045/how-to-check-if-a-process-is-running-inside-docker-container |
| | | char path[MAX_PATH] = { 0 }; |
| | | char proc_path[MAX_PATH], pidStr[64]; |
| | | pid_t pid = getpid(); |
| | | sprintf(pidStr, "%d", pid); |
| | | strcpy(proc_path, "/proc/"); |
| | | strcat(proc_path, pidStr); |
| | | strcat(proc_path, "/cgroup"); |
| | | |
| | | FILE * fp; |
| | | char * line = NULL; |
| | | size_t len = 0; |
| | | ssize_t read; |
| | | int result = 0; |
| | | |
| | | fp = fopen(proc_path, "r"); |
| | | if (fp == NULL) { |
| | | return 0; |
| | | } |
| | | |
| | | while ((read = getline(&line, &len, fp)) != -1 && result == 0) { |
| | | //line[len]=0; |
| | | //printf("Retrieved line of length %zu:\n", read); |
| | | //printf("%s", line); |
| | | if(strstr(line, "docker") != NULL || strstr(line, "lxc") != NULL) { |
| | | result = 1; |
| | | } |
| | | } |
| | | |
| | | fclose(fp); |
| | | if(line) free(line); |
| | | return result; |
| | | } |
| | | |
| | | //0=NO 1=Docker/Lxc |
| | | static int checkLXC() { |
| | | return (access("/var/run/systemd/container",F_OK)==0) ? 1:0; |
| | | } |
| | | |
| | | VIRTUALIZATION getVirtualization() { |
| | | VIRTUALIZATION result = NONE; |
| | | int isContainer = checkContainerProc(); |
| | | if (isContainer == 1) { |
| | | result = CONTAINER; |
| | | } else if(checkLXC()){ |
| | | result = CONTAINER; |
| | | } |
| | | return result; |
| | | |
| | | //http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html |
| | | // |
| | | //bool rc = true; |
| | |
| | | "pop %edx \n" |
| | | );*/ |
| | | |
| | | //systemd-detect-virt |
| | | return NONE; |
| | | } |
| | | |
| | |
| | | free(hashStr);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * Not implemented yet.
|
| | | */
|
| | | VIRTUALIZATION getVirtualization() {
|
| | | return NONE;
|
| | | }
|
| | |
|
| | |
| | | #endif |
| | | |
| | | typedef enum { |
| | | NONE, VMWARE |
| | | NONE, CONTAINER, VM |
| | | } VIRTUALIZATION; |
| | | |
| | | typedef enum { |
| | |
| | | string client_signature = ""; |
| | | if (vm.count("client_signature")) { |
| | | client_signature = vm["client_signature"].as<string>(); |
| | | cout << "cli sig:" << client_signature; |
| | | regex e("[A-Za-z0-9\\+/]{4}-[A-Za-z0-9\\+/]{4}-[A-Za-z0-9\\+/]{4}-[A-Za-z0-9\\+/]{4}"); |
| | | cout << "\nregex:"; |
| | | if (!regex_match(client_signature, e)) { |
| | | cerr << endl << "Client signature not recognized: " |
| | | << client_signature |
| | |
| | | BOOST_TEST_CHECKPOINT("Before generate"); |
| | | FUNCTION_RETURN generate_ok = generate_user_pc_signature(identifier_out, |
| | | strategy); |
| | | BOOST_TEST_CHECKPOINT("After generate signature"); |
| | | BOOST_ASSERT(generate_ok == FUNCTION_RETURN::FUNC_RET_OK); |
| | | cout << "Identifier:" << identifier_out << endl; |
| | | vector<string> extraArgs; |
| | | extraArgs.push_back("-s"); |
| | | extraArgs.push_back(identifier_out); |
| | | BOOST_TEST_CHECKPOINT("Before generate license"); |
| | | generate_license(licLocation, extraArgs); |
| | | |
| | | LicenseInfo license; |
| | |
| | | strategies[i]); |
| | | BOOST_ASSERT(generate_ok == FUNC_RET_OK); |
| | | if (generate_ok != FUNC_RET_OK){ |
| | | BOOST_ERROR("Generating identifier for strategy " << strategies[i] << " failed with: " << generate_ok); |
| | | BOOST_ERROR( |
| | | "Generating identifier for strategy " << strategies[i] << " failed with: " << generate_ok); |
| | | idfile << "0000-0000-0000-0000" << endl; |
| | | } |
| | | else |
| | | } else |
| | | idfile << identifier_out << endl; |
| | | } |
| | | idfile.close(); |
| | |
| | | |
| | | BOOST_AUTO_TEST_CASE(generated_identifiers_stability) { |
| | | const string idfileLocation(PROJECT_TEST_TEMP_DIR "/identifiers_file"); |
| | | IDENTIFICATION_STRATEGY strategies[] = |
| | | { DEFAULT, |
| | | DISK_LABEL, |
| | | DISK_NUM, |
| | | ETHERNET }; |
| | | const int num_strategies = sizeof(strategies) / sizeof(strategies[0]); |
| | | std::vector<IDENTIFICATION_STRATEGY> strategies; |
| | | if (getVirtualization() != CONTAINER) { |
| | | strategies = { DEFAULT, DISK_LABEL, DISK_NUM, ETHERNET }; |
| | | } else { |
| | | strategies = { DEFAULT, ETHERNET }; |
| | | } |
| | | int num_strategies = strategies.size(); |
| | | std::ifstream test_idfile_exist(idfileLocation); |
| | | if (!test_idfile_exist.good()){ |
| | | generate_reference_file(idfileLocation, strategies, num_strategies); |
| | | } |
| | | else{ |
| | | generate_reference_file(idfileLocation, strategies.data(), |
| | | strategies.size()); |
| | | } else { |
| | | std::istream_iterator<string> start(test_idfile_exist), end; |
| | | std::vector<string> reference_signatures(start, end); |
| | | test_idfile_exist.close(); |
| | | if (reference_signatures.size() != num_strategies || |
| | | std::find(reference_signatures.begin(), reference_signatures.end(), "0000-0000-0000-0000") != reference_signatures.end()) |
| | | generate_reference_file(idfileLocation, strategies, num_strategies); |
| | | if (reference_signatures.size() != num_strategies |
| | | || std::find(reference_signatures.begin(), |
| | | reference_signatures.end(), "0000-0000-0000-0000") |
| | | != reference_signatures.end()) |
| | | generate_reference_file(idfileLocation, strategies.data(), num_strategies); |
| | | } |
| | | std::ifstream is(idfileLocation); |
| | | std::istream_iterator<string> start(is), end; |
| | | std::vector<string> reference_signatures(start, end); |
| | | BOOST_TEST_CHECKPOINT("Generating current signatures and comparing with past"); |
| | | BOOST_TEST_CHECKPOINT( |
| | | "Generating current signatures and comparing with past"); |
| | | for (int i = 0; i < num_strategies; i++) { |
| | | PcSignature generated_identifier; |
| | | FUNCTION_RETURN generate_ok = generate_user_pc_signature( |
| | | generated_identifier, strategies[i]); |
| | | BOOST_ASSERT(generate_ok == FUNCTION_RETURN::FUNC_RET_OK); |
| | | if (generate_ok != FUNC_RET_OK){ |
| | | BOOST_ERROR("Generating identifier for strategy " << strategies[i] << " failed with: " << generate_ok); |
| | | BOOST_ERROR( |
| | | "Generating identifier for strategy " << strategies[i] << " failed with: " << generate_ok); |
| | | continue; |
| | | } |
| | | if (reference_signatures[i] != generated_identifier) { |
| | | string message = string("pc signature compare fail: strategy: ") |
| | | + to_string(static_cast<long long>(strategies[i])) + " generated: [" |
| | | + generated_identifier + "] reference: [" |
| | | + to_string(static_cast<long long>(strategies[i])) |
| | | + " generated: [" + generated_identifier + "] reference: [" |
| | | + reference_signatures[i] + "]"; |
| | | BOOST_ERROR(message); |
| | | } |
| | |
| | | using namespace std; |
| | | |
| | | BOOST_AUTO_TEST_CASE( read_disk_id ) { |
| | | VIRTUALIZATION virt = getVirtualization(); |
| | | if(virt == NONE || virt == VM) { |
| | | DiskInfo * diskInfos = NULL; |
| | | size_t disk_info_size = 0; |
| | | FUNCTION_RETURN result = getDiskInfos(NULL, &disk_info_size); |
| | |
| | | BOOST_CHECK_GT(strlen(diskInfos[0].label), 0); |
| | | BOOST_CHECK_GT(diskInfos[0].disk_sn[0], 0); |
| | | free(diskInfos); |
| | | } else if(virt == CONTAINER){ |
| | | //docker or lxc diskInfo is not meaningful |
| | | DiskInfo * diskInfos = NULL; |
| | | size_t disk_info_size = 0; |
| | | FUNCTION_RETURN result = getDiskInfos(NULL, &disk_info_size); |
| | | BOOST_CHECK_EQUAL(result, FUNC_RET_NOT_AVAIL); |
| | | } |
| | | } |
| | | |
| | | BOOST_AUTO_TEST_CASE( read_network_adapters ) { |
| | |
| | | } |
| | | free(adapter_info); |
| | | } |
| | | |
| | | BOOST_AUTO_TEST_CASE( get_cpuid ) { |
| | | BOOST_CHECK_EQUAL(1, 1); |
| | | } |
| | | |
| | | //To test if virtualization is detected correctly define an env variable VIRT_ENV |
| | | //otherwise the test is skipped |
| | | BOOST_AUTO_TEST_CASE( test_virtualization ) { |
| | | const char *env = getenv("VIRT_ENV"); |
| | | if (env != NULL) { |
| | | if (strcmp(env, "CONTAINER") == 0) { |
| | | VIRTUALIZATION virt = getVirtualization(); |
| | | BOOST_CHECK_EQUAL(virt, CONTAINER); |
| | | } else if (strcmp(env, "VM") == 0) { |
| | | BOOST_FAIL("check for vm not implemented"); |
| | | } else if (strcmp(env, "NONE") == 0) { |
| | | VIRTUALIZATION virt = getVirtualization(); |
| | | BOOST_CHECK_EQUAL(virt, NONE); |
| | | } else { |
| | | BOOST_FAIL(string("value ") + env + " not supported: VM,CONTAINER,NONE"); |
| | | } |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | @echo off |
| | | if not exist "C:/local/boost/include" ( |
| | | echo "Boost not cached, compiling it" |
| | | wget -q https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.7z |
| | | echo "Boost downloaded" |
| | | 7z x boost_1_68_0.7z -bb1 -oC:/local | C:\Windows\System32\findstr.exe /r /c:”cpp” |
| | | cd "C:/local/boost_1_68_0" |
| | | dir |
| | | C:/local/boost_1_68_0/bootstrap.bat |
| | | C:/local/boost_1_68_0/b2.exe --with-date_time --with-test --with-filesystem --with-program_options --with-regex --with-serialization --with-system runtime-link=static --prefix=C:/local/boost stage |
| | | C:/local/boost_1_68_0/b2.exe --with-date_time --with-test --with-filesystem --with-program_options --with-regex --with-serialization --with-system runtime-link=static --prefix=C:/local/boost install > a.txt 2>&1 |
| | | cd C:/local/boost |
| | | dir |
| | | ) |