Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Testing on Windows #36

Open
kaczmarczyck opened this issue Oct 19, 2020 · 2 comments
Open

Testing on Windows #36

kaczmarczyck opened this issue Oct 19, 2020 · 2 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@kaczmarczyck
Copy link
Contributor

The tool is currently used mainly on Linux and MacOS. We need to run all features on Windows to make sure it works.

@kaczmarczyck kaczmarczyck added the help wanted Extra attention is needed label Oct 19, 2020
@kaczmarczyck kaczmarczyck self-assigned this Oct 19, 2020
@jmichelp
Copy link

Why don't you also run some test on Windows through github workflows?
And you can even have a scheduled workflow to make a nightly build on all supported OSes every night.

@kaczmarczyck
Copy link
Contributor Author

First finding: Bazel's stamping doesn't work on Windows.

A workaround to disable this feature (you have to manually change your report to contain the commit):

diff --git a/.bazelrc b/.bazelrc
index ef88d3d..fbc86ef 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1 +1 @@
-build --cxxopt='-std=c++17' --stamp --workspace_status_command=tools/workspace_status.bat
+build --cxxopt='-std=c++17' --workspace_status_command=tools/workspace_status.bat
diff --git a/BUILD b/BUILD
index 9256f68..ca7cdad 100644
--- a/BUILD
+++ b/BUILD
@@ -93,7 +93,6 @@ cc_library(
         ":constants",
         ":device_interface",
         ":parameter_check",
-        ":stamp",
         "//third_party/chromium_components_cbor:cbor",
         "@com_github_nlohmann_json//:json",
         "@com_google_absl//absl/time",
@@ -158,11 +157,6 @@ cc_library(
     ],
 )
 
-cc_library(
-    name = "stamp",
-    linkstamp = "src/stamp.cc"
-)
-
 cc_binary(
     name = "fido2_conformance",
     srcs = ["src/fido2_conformance_main.cc"],
diff --git a/src/device_tracker.cc b/src/device_tracker.cc
index 64db645..7c0bd52 100644
--- a/src/device_tracker.cc
+++ b/src/device_tracker.cc
@@ -22,8 +22,6 @@
 #include "src/parameter_check.h"
 #include "third_party/chromium_components_cbor/values.h"
 
-extern const char build_scm_revision[];
-
 namespace fido2_tests {
 namespace {
 constexpr std::string_view kFileType = ".json";
@@ -341,7 +339,7 @@ void DeviceTracker::SaveResultsToFile(std::string_view results_dir) const {
   CHECK(results_file.is_open()) << "Unable to open file: " << results_path;
 
   results_file << std::setw(2)
-               << GenerateResultsJson(build_scm_revision, time_string)
+               << GenerateResultsJson("unknown revision", time_string)
                << std::endl;
 }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants