8000 Merge pull request #20 from mrubyc/mrubyc-3.3 · mrubyc/mrubyc-test@1ae7eb2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1ae7eb2

Browse files
authored
Merge pull request #20 from mrubyc/mrubyc-3.3
To correspond to mruby/c 3.3
2 parents 4b903aa + d3487a1 commit 1ae7eb2

File tree

4 files changed

+39
-24
lines changed

4 files changed

+39
-24
lines changed

Gemfile.lock

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,50 @@
11
PATH
22
remote: .
33
specs:
4-
mrubyc-test (0.9.2)
4+
mrubyc-test (0.10.0)
55
activesupport (~> 7.0)
66
rufo (~> 0.12)
77
thor (~> 1.2)
88

99
GEM
1010
remote: https://rubygems.org/
1111
specs:
12-
activesupport (7.0.4.2)
12+
activesupport (7.1.3.2)
13+
base64
14+
bigdecimal
1315
concurrent-ruby (~> 1.0, >= 1.0.2)
16+
connection_pool (>= 2.2.5)
17+
drb
1418
i18n (>= 1.6, < 2)
1519
minitest (>= 5.1)
20+
mutex_m
1621
tzinfo (~> 2.0)
17-
concurrent-ruby (1.2.2)
18-
diff-lcs (1.5.0)
19-
i18n (1.12.0)
22+
base64 (0.2.0)
23+
bigdecimal (3.1.7)
24+
concurrent-ruby (1.2.3)
25+
connection_pool (2.4.1)
26+
diff-lcs (1.5.1)
27+
drb (2.2.1)
28+
i18n (1.14.4)
2029
concurrent-ruby (~> 1.0)
21-
minitest (5.18.0)
22-
rake (13.0.6)
23-
rspec (3.12.0)
24-
rspec-core (~> 3.12.0)
25-
rspec-expectations (~> 3.12.0)
26-
rspec-mocks (~> 3.12.0)
27-
rspec-core (3.12.1)
28-
rspec-support (~> 3.12.0)
29-
rspec-expectations (3.12.2)
30+
minitest (5.22.3)
31+
mutex_m (0.2.0)
32+
rake (13.1.0)
33+
rspec (3.13.0)
34+
rspec-core (~> 3.13.0)
35+
rspec-expectations (~> 3.13.0)
36+
rspec-mocks (~> 3.13.0)
37+
rspec-core (3.13.0)
38+
rspec-support (~> 3.13.0)
39+
rspec-expectations (3.13.0)
3040
diff-lcs (>= 1.2.0, < 2.0)
31-
rspec-support (~> 3.12.0)
32-
rspec-mocks (3.12.4)
41+
rspec-support (~> 3.13.0)
42+
rspec-mocks (3.13.0)
3343
diff-lcs (>= 1.2.0, < 2.0)
34-
rspec-support (~> 3.12.0)
35-
rspec-support (3.12.0)
36-
rufo (0.15.1)
37-
thor (1.2.1)
44+
rspec-support (~> 3.13.0)
45+
rspec-support (3.13.1)
46+
rufo (0.17.1)
47+
thor (1.3.1)
3848
tzinfo (2.0.6)
3949
concurrent-ruby (~> 1.0)
4050

lib/mrubyc-test.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,16 @@ def make(mrbc_path)
5151
exit_code = 0
5252
cc = ENV['CC'].to_s.length > 0 ? ENV['CC'] : "gcc"
5353
qemu = ENV['QEMU']
54+
mrubyc_src_dir = "#{pwd}/#{config['mrubyc_src_dir']}"
55+
hal_dir = File.join(mrubyc_src_dir, '../hal/posix')
5456
Dir.chdir(tmp_dir) do
5557
[
5658
"#{mrbc_path} -B test test.rb",
5759
"#{mrbc_path} -B models models.rb",
58-
"#{cc} -O0 -g3 -Wall -I #{pwd}/#{config['mrubyc_src_dir']} -static -o test main.c #{pwd}/#{config['mrubyc_src_dir']}/*.c #{pwd}/#{config['mrubyc_src_dir']}/hal_posix/*.c -DMRBC_INT64 -DMAX_SYMBOLS_COUNT=10000 -DMRBC_USE_MATH=1 -DMRBC_USE_HAL_POSIX #{ENV["CFLAGS"]} #{ENV["LDFLAGS"]}",
60+
"#{cc} -O0 -g3 -Wall " +
61+
"-I #{mrubyc_src_dir} -I #{hal_dir} -static " +
62+
"-o test main.c #{mrubyc_src_dir}/*.c #{hal_dir}/*.c " +
63+
"-DMRBC_INT64 -DMAX_SYMBOLS_COUNT=10000 -DMRBC_USE_MATH=1 -DMRBC_USE_HAL_POSIX #{ENV["CFLAGS"]} #{ENV["LDFLAGS"]}",
5964
"#{qemu} ./test"
6065
].each do |cmd|
6166
puts cmd

lib/mrubyc/test/config.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ def write(config)
3333
def mrubycfile
3434
if ENV['MRUBYCFILE']
3535
ENV['MRUBYCFILE']
36-
elsif File.exists? 'Mrubycfile'
36+
elsif File.exist? 'Mrubycfile'
3737
'Mrubycfile'
38-
elsif File.exists? '.mrubycconfig'
38+
elsif File.exist? '.mrubycconfig'
3939
'.mrubycconfig'
4040
else
4141
FileUtils.touch 'Mrubycfile'

lib/mrubyc/test/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Mrubyc
22
module Test
3-
VERSION = "0.9.2"
3+
VERSION = "0.10.0"
44
end
55
end

0 commit comments

Comments
 (0)
0