re-introduce old nss im too tired for this

This commit is contained in:
wuggy 2026-06-30 06:37:32 +01:00
commit 3a838106b9
2871 changed files with 1374431 additions and 1762417 deletions

View file

@ -6,15 +6,6 @@
#define GTEST_HAS_RTTI 0
#include "gtest/gtest.h"
// Tests are passed the location of their source directory
// so that they can load extra resources from there.
std::string g_source_dir;
void usage(const char *progname) {
PR_fprintf(PR_STDERR, "Usage: %s [-s <dir>] [-d <dir> [-w]]\n", progname);
exit(2);
}
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
@ -22,18 +13,13 @@ int main(int argc, char **argv) {
uint32_t flags = NSS_INIT_READONLY;
for (int i = 0; i < argc; i++) {
if (!strcmp(argv[i], "-s")) {
if (!strcmp(argv[i], "-d")) {
if (i + 1 >= argc) {
usage(argv[0]);
PR_fprintf(PR_STDERR, "Usage: %s [-d <dir> [-w]]\n", argv[0]);
exit(2);
}
workdir = argv[i + 1];
i++;
g_source_dir = argv[i];
} else if (!strcmp(argv[i], "-d")) {
if (i + 1 >= argc) {
usage(argv[0]);
}
i++;
workdir = argv[i];
} else if (!strcmp(argv[i], "-w")) {
flags &= ~NSS_INIT_READONLY;
}