-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Restore files used in nightly * fix helm test to use renamed argo * point test to correct python location * use python 3.9 for :=
- Loading branch information
LisannaAtGalois
authored
Mar 10, 2021
1 parent
9943b5c
commit 8a0a009
Showing
3 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import sys | ||
import argo_client.connection as argo | ||
import cryptol | ||
|
||
connType = sys.argv[1] | ||
host = sys.argv[2] | ||
port = int(sys.argv[3]) | ||
|
||
if connType == 'socket': | ||
c = cryptol.connect(argo.RemoteSocketProcess(host, port=port, ipv6=False)) | ||
elif connType == 'http': | ||
c = cryptol.CryptolConnection(argo.ServerConnection(argo.HttpProcess(url="http://%s:%d/" % (host,port)))) | ||
else: | ||
raise Exception('specify socket or http for connection type') | ||
|
||
c.load_module('Cryptol') | ||
assert c.evaluate_expression("1+1").result()['value'] == 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM python:3.9 | ||
# Intended to be built from the root of the cryptol git repository | ||
|
||
COPY cryptol-remote-api/python python | ||
RUN pip3 install -r python/requirements.txt | ||
RUN pip3 install -e python | ||
COPY cryptol-remote-api/test-cryptol-remote-api.py /entrypoint.py | ||
ENTRYPOINT ["python3", "/entrypoint.py"] |