Skip to content

Commit 2c84b4e

Browse files
committed
CI: add make distcheck to build
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
1 parent 52966db commit 2c84b4e

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,7 @@ jobs:
5050

5151
- name: Test
5252
run: make check || (cat test-suite.log && exit -1)
53+
54+
- name: Distcheck
55+
run: make distcheck DISTCHECK_CONFIGURE_FLAGS="--with-nginx=/tmp/nginx" DESTDIR="/tmp/mod_auth_openidc"
56+

Makefile.am

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ includesub_HEADERS = \
3131
include/oauth2/openidc.h \
3232
include/oauth2/session.h \
3333
include/oauth2/cfg.h \
34-
include/oauth2/util.h
35-
36-
nodist_includesub_HEADERS = \
34+
include/oauth2/util.h \
3735
include/oauth2/version.h
3836

3937
#

test/check_liboauth2.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,14 @@ void liboauth2_check_register_http_callbacks(
109109
p = strrchr(path, '.'); \
110110
if (p) \
111111
*p = '\0'; \
112+
p = path; \
113+
while (*p == '.') { \
114+
p++; \
115+
if (*p == '/') p++; \
116+
} \
117+
if (*p == '/') p++; \
112118
_http_base_path = \
113-
oauth2_stradd(NULL, "/", path, NULL); \
119+
oauth2_stradd(NULL, "/", p, NULL); \
114120
oauth2_mem_free(path); \
115121
} \
116122
return _http_base_path; \

test/check_openidc.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ START_TEST(test_openidc_resolver)
534534
oauth2_cfg_openidc_t *c = NULL;
535535
oauth2_http_request_t *r = NULL;
536536
oauth2_openidc_provider_t *provider = NULL;
537+
char filename[512];
537538

538539
c = oauth2_cfg_openidc_init(_log);
539540
r = oauth2_http_request_init(_log);
@@ -550,8 +551,9 @@ START_TEST(test_openidc_resolver)
550551
oauth2_openidc_provider_free(_log, provider);
551552
provider = NULL;
552553

554+
sprintf((char *)filename, "%s/%s", getenv("srcdir") ? getenv("srcdir") : ".", "test/provider.json");
553555
rv = oauth2_cfg_openidc_provider_resolver_set_options(
554-
_log, c, "file", "./test/provider.json", NULL);
556+
_log, c, "file", filename, NULL);
555557
ck_assert_ptr_eq(rv, NULL);
556558

557559
rc = _oauth2_openidc_provider_resolve(_log, c, r, NULL, &provider);
@@ -640,12 +642,14 @@ START_TEST(test_openidc_client)
640642
char *rv = NULL;
641643
oauth2_cfg_openidc_t *cfg = NULL;
642644
oauth2_openidc_client_t *client = NULL;
645+
char filename[512];
643646

644647
cfg = oauth2_cfg_openidc_init(_log);
645648
ck_assert_ptr_ne(cfg, NULL);
646649

650+
sprintf((char *)filename, "%s/%s", getenv("srcdir") ? getenv("srcdir") : ".", "test/client.json");
647651
rv = oauth2_openidc_client_set_options(
648-
_log, cfg, "file", "./test/client.json", "ssl_verify=false");
652+
_log, cfg, "file", filename, "ssl_verify=false");
649653
ck_assert_ptr_eq(rv, NULL);
650654

651655
client = oauth2_cfg_openidc_client_get(_log, cfg);

0 commit comments

Comments
 (0)