GitLab maintenance scheduled for Today, 2019-04-24, from 12:00 to 13:00 CDT - Services will be unavailable during this time.

Commit c81c458d authored by Valentin Reis's avatar Valentin Reis

[refactor] use the new downstream nrm API

The ci setup was also changed to better isolate library building
from integration tests.
parents 4d816df0 fdb93a74
Pipeline #4773 passed with stages
in 26 seconds
stages:
- build
- test
#- build
#make:generic:
#stage: build
......@@ -16,11 +16,41 @@ stages:
#except:
#- /^wip.*/
#- /^WIP.*/
#
integration.test:
libnrm.build:
stage: build
script:
- nix-build .integration.nix -A libnrm
except:
- /^wip\/.*/
- /^WIP\/.*/
tags:
- integration
helloworld.integration.test:
stage: test
script:
- nix-shell .integration.nix -A test --run "argotk.hs helloworld"
artifacts:
paths:
- _output/cmd_err.log
- _output/cmd_out.log
- _output/daemon_out.log
- _output/daemon_out.log
- _output/nrm.log
- _output/.argo_nodeos_config_exit_message
expire_in: 1 week
except:
- /^wip\/.*/
- /^WIP\/.*/
tags:
- integration
perfwrapper.integration.test:
stage: test
script:
- nix-shell .integration.nix --run "argotk.hs helloworld"
- nix-shell .integration.nix -A test --run "argotk.hs perfwrapper"
artifacts:
paths:
- _output/cmd_err.log
......@@ -28,7 +58,6 @@ integration.test:
- _output/daemon_out.log
- _output/daemon_out.log
- _output/nrm.log
- _output/time.log
- _output/.argo_nodeos_config_exit_message
expire_in: 1 week
except:
......
{ argotest ? (builtins.fetchGit {
url = https://xgitlab.cels.anl.gov/argo/argotest.git;
ref="refactor-argotk";
rev="e96e94a17a8046d0f7c8b2908dcb5fb25ead7b96"; })
ref="master";
rev="2589756882a96dee624f4ed420510b720a85f2b0";
})
}:
(import argotest {
libnrm-src = ./.;
}).test
nrm-src = builtins.fetchGit {
url = https://xgitlab.cels.anl.gov/argo/nrm.git;
ref="downstream-refactor";
rev="37f5594287f77e42f3bf5f6b5a89f387c8905137";
};
})
......@@ -28,7 +28,8 @@ int nrm_init(struct nrm_context *ctxt, const char *uuid)
assert(ctxt->container_uuid != NULL);
ctxt->app_uuid = (char *)uuid;
ctxt->context = zmq_ctx_new();
ctxt->socket = zmq_socket(ctxt->context, ZMQ_PUB);
ctxt->socket = zmq_socket(ctxt->context, ZMQ_DEALER);
zmq_setsockopt(ctxt->socket, ZMQ_IDENTITY, ctxt->app_uuid, strnlen(uuid, 255));
int err = zmq_connect(ctxt->socket, uri);
assert(err == 0);
char buf[512];
......
......@@ -28,13 +28,13 @@ struct nrm_context {
unsigned long acc;
};
#define NRM_DEFAULT_URI "ipc:///tmp/nrm-downstream-in"
#define NRM_ENV_URI "ARGO_NRM_DOWNSTREAM_IN_URI"
#define NRM_DEFAULT_URI "ipc:///tmp/nrm-downstream-event"
#define NRM_ENV_URI "ARGO_NRM_DOWNSTREAM_EVENT_URI"
#define NRM_START_FORMAT "{\"type\":\"application\", \"event\":\"start\", \"container\": \"%s\", \"uuid\": \"%s\", \"progress\": true, \"threads\": null}"
#define NRM_PROGRESS_FORMAT "{\"type\":\"application\", \"event\":\"progress\", \"payload\": \"%lu\", \"uuid\": \"%s\"}"
#define NRM_START_FORMAT "{\"api\":\"down_event\", \"type\":\"application_start\", \"container_uuid\": \"%s\", \"application_uuid\": \"%s\"}"
#define NRM_PROGRESS_FORMAT "{\"api\":\"down_event\", \"type\":\"progress\", \"payload\": \"%lu\"}"
#define NRM_PHASE_CONTEXT_FORMAT "{\"type\":\"application\", \"event\":\"phase_context\", \"cpu\": \"%u\", \"aggregation\": \"%u\", \"computetime\": \"%llu\", \"totaltime\": \"%llu\", \"uuid\": \"%s\"}"
#define NRM_EXIT_FORMAT "{\"type\":\"application\", \"event\":\"exit\", \"uuid\": \"%s\"}"
#define NRM_EXIT_FORMAT "{\"api\": \"down_event\", \"type\":\"application_exit\"}"
int nrm_init(struct nrm_context *, const char *);
int nrm_fini(struct nrm_context *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment