on master help sign in
Fix the docker tests so they work with the new changes (hopefully)
commita3759690e053221154f008f27e3019d91f03631e authorguillaume <guillaume@repl.it> dateFri 25 Jun 2021, 14:13 (5 years ago) parentb61b813
7 files changed+20−30
Dockerfile+3−1 Dockerfile.dev+1−1 build-prybar.nix+1 languages/ruby/main.go+1−1 scripts/docker-install.sh+12−15 tests/nodejs/err.exp+1−12 tests/ocaml/quiet.exp+1
Dockerfile+3−1
@@ -1,4 +1,4 @@
1−FROM ubuntu:18.04
1+FROM ubuntu:20.04
22
33COPY scripts/docker-install.sh /tmp/docker-install.sh
44RUN /tmp/docker-install.sh
@@ -8,6 +8,8 @@ COPY . /gocode/src/github.com/replit/prybar
88WORKDIR /gocode/src/github.com/replit/prybar
99
1010ENV GOPATH=/gocode LC_ALL=C.UTF-8 PATH="/gocode/src/github.com/replit/prybar:$PATH"
11+ENV GOROOT=/usr/local/go
12+ENV PATH=$PATH:$GOROOT/bin
1113
1214RUN cp languages/tcl/tcl.pc /usr/lib/pkgconfig/
1315RUN make
Dockerfile.dev+1−1
@@ -1,4 +1,4 @@
1−FROM ubuntu:18.04
1+FROM ubuntu:20.04
22
33COPY scripts/docker-install.sh /tmp/docker-install.sh
44RUN /tmp/docker-install.sh
build-prybar.nix+1
@@ -32,6 +32,7 @@ in buildGoModule {
3232 # If a language requires this, it MUST expost a ${pkgName}.pc file in its `lib/pkg-config`
3333 # for pkg-config to detect it. Otherwise, we can't find the required flags.
3434 preBuild = ''
35+ export CGO_LDFLAGS_ALLOW="-Wl,--compress-debug-sections=zlib"
3536 ${if setFlags then ''
3637 NIX_CFLAGS_COMPILE="$(pkg-config --cflags ${pkgName}) $NIX_CFLAGS_COMPILE"
3738 NIX_LDFLAGS="$(pkg-config --libs-only-L ${pkgName}) $(pkg-config --libs-only-l ${pkgName}) $NIX_LDFLAGS"
languages/ruby/main.go+1−1
@@ -3,7 +3,7 @@ package main
33// USING_CGO
44
55/*
6−#cgo CGO_LDFLAGS_ALLOW="-Wl,--compress-debug-sections=zlib" pkg-config: --libs --cflags ruby-2.7
6+#cgo pkg-config: ruby-2.7
77#include "pry_ruby.h"
88*/
99import "C"
scripts/docker-install.sh+12−15
@@ -13,8 +13,10 @@ emacs-nox
1313liblua5.1-dev
1414nodejs
1515ocaml
16+ocaml-findlib
17+opam
1618python-dev
17−ruby-dev
19+ruby2.7-dev
1820sqlite3
1921tcl-dev
2022
@@ -26,15 +28,10 @@ python3.8-dev
2628bsdmainutils
2729build-essential
2830expect
29−golang
3031
3132# things we link against
3233libreadline-dev
3334
34−# needed for the version of libmozjs that we download
35−libffi-dev
36−libnspr4-dev
37−
3835# used during installation
3936git
4037wget
@@ -47,10 +44,17 @@ rlwrap
4744export DEBIAN_FRONTEND=noninteractive
4845apt-get update
4946apt-get install -y curl
50−curl -sL https://deb.nodesource.com/setup_12.x | bash -
47+curl -sL https://deb.nodesource.com/setup_14.x | bash -
5148apt-get install -y $(grep -v "^#" <<< "$packages")
5249rm -rf /var/lib/apt/lists/*
5350
51+go_version=1.16.5
52+wget "https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz"
53+tar -xvf "go${go_version}.linux-amd64.tar.gz"
54+mv go /usr/local
55+rm -f "go${go_version}.linux-amd64.tar.gz"
56+rm -rf go
57+
5458clojure_version=1.10.1.478
5559wget "https://download.clojure.org/install/linux-install-${clojure_version}.sh"
5660chmod +x "linux-install-${clojure_version}.sh"
@@ -58,7 +62,7 @@ chmod +x "linux-install-${clojure_version}.sh"
5862
5963# The version in the Disco repos is out of date (1.0 series) and does
6064# not expose the API we need.
61−wget -nv https://julialang-s3.julialang.org/bin/linux/x64/1.4/julia-1.4.1-linux-x86_64.tar.gz
65+wget -nv https://julialang-s3.julialang.org/bin/linux/x64/1.5/julia-1.5.4-linux-x86_64.tar.gz
6266tar -xf *.tar.gz
6367cp -R julia-*/bin/* /usr/bin/
6468cp -R julia-*/include/* /usr/include/
@@ -66,13 +70,6 @@ cp -R julia-*/lib/* /usr/lib/
6670cp -R julia-*/share/* /usr/share/
6771rm -rf julia-*
6872
69−# The version in the Disco repos is not compatible with cgo ("invalid
70−# flag in pkg-config --cflags: -include").
71−wget -nv https://launchpadlibrarian.net/309343863/libmozjs185-1.0_1.8.5-1.0.0+dfsg-7_amd64.deb
72−wget -nv https://launchpadlibrarian.net/309343864/libmozjs185-dev_1.8.5-1.0.0+dfsg-7_amd64.deb
73−dpkg -i *.deb
74−rm *.deb
75−
7673wget -nv https://downloads.lightbend.com/scala/2.13.1/scala-2.13.1.tgz
7774tar -xf *.tgz
7875cp -R scala-*/bin/* /usr/local/bin/
tests/nodejs/err.exp+1−12
@@ -5,17 +5,6 @@ spawn ./prybar-nodejs -i -q
55match_max 100000
66expect -exact "\[1G\[0J--> \[5G"
77send -- "x\r"
8−expect -exact "x\r\r
9−\[0m\[31mReferenceError: x is not defined\r
10− at REPL1:1:1\r
11− at Script.runInThisContext (vm.js:133:18)\r
12− at REPLServer.defaultEval (repl.js:486:29)\r
13− at bound (domain.js:416:15)\r
14− at REPLServer.runBound \[as eval\] (domain.js:427:12)\r
15− at REPLServer.onLine (repl.js:819:10)\r
16− at REPLServer.emit (events.js:376:20)\r
17− at REPLServer.emit (domain.js:470:12)\r
18− at REPLServer.Interface._onLine (readline.js:342:10)\r
19− at REPLServer.Interface._line (readline.js:671:8)\[0m\[1G\[0J--> \[5G"
8+expect -re "ReferenceError: x is not defined\r"
209send -- ""
2110expect eof
tests/ocaml/quiet.exp+1
@@ -1,5 +1,6 @@
11#!/usr/bin/expect -f
22
3+exp_internal 1
34spawn ./prybar-ocaml -q -i
45match_max 100000
56expect -exact "--> "