Skip to content

Commit

Permalink
Fix vm_path for Squeak32-6.0 and Squeak32-trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Jul 7, 2022
1 parent 637bde5 commit 9b0e05c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
12 changes: 9 additions & 3 deletions squeak/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ squeak::get_vm_details() {
local vm_file_ext
local vm_filename
local vm_path
local vm_path_linux_name=""
local vm_path_linux_suffix="ht"

if is_trunk_build; then
Expand Down Expand Up @@ -192,13 +193,18 @@ squeak::get_vm_details() {
vm_file_ext="tar.gz"
if [[ "${require_spur}" -eq 1 ]]; then
if is_64bit; then
vm_path="${config_vm_dir}/sqcogspur64linux${vm_path_linux_suffix}/squeak"
vm_path_linux_name="sqcogspur64linux"
else
vm_path="${config_vm_dir}/sqcogspurlinux${vm_path_linux_suffix}/squeak"
if [[ "${osvm_version}" -ge "202206021410" ]]; then
vm_path_linux_name="sqcogspur32linux"
else
vm_path_linux_name="sqcogspurlinux"
fi
fi
else
vm_path="${config_vm_dir}/sqcoglinux${vm_path_linux_suffix}/squeak"
vm_path_linux_name="sqcoglinux"
fi
vm_path="${config_vm_dir}/${vm_path_linux_name}${vm_path_linux_suffix}/squeak"
;;
"Darwin")
if is_64bit; then
Expand Down
20 changes: 17 additions & 3 deletions tests/squeak_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,25 @@ test_get_vm_details() {
assertEquals "${config_vm_dir}/sqcogspur64linuxht/squeak" "${vm_path}"
starts_with "${git_tag}" "v2" || fail "Unexpected git_tag: '${git_tag}'"

config_smalltalk="Squeak64-6.0"
vm_details="$(squeak::get_vm_details "${config_smalltalk}" "Linux" 1)"
set_vars vm_filename vm_path git_tag "${vm_details}"
assert_vm_filename "${vm_filename}" "squeak.cog.spur_linux64x64_"
assertEquals "${config_vm_dir}/sqcogspur64linuxht/squeak" "${vm_path}"
starts_with "${git_tag}" "v2" || fail "Unexpected git_tag: '${git_tag}'"

config_smalltalk="Squeak32-6.0"
vm_details="$(squeak::get_vm_details "${config_smalltalk}" "Linux" 1)"
set_vars vm_filename vm_path git_tag "${vm_details}"
assert_vm_filename "${vm_filename}" "squeak.cog.spur_linux32x86_"
assertEquals "${config_vm_dir}/sqcogspur32linuxht/squeak" "${vm_path}"
starts_with "${git_tag}" "v2" || fail "Unexpected git_tag: '${git_tag}'"

config_smalltalk="Squeak64-5.3"
vm_details="$(squeak::get_vm_details "${config_smalltalk}" "Linux" 0)"
vm_details="$(squeak::get_vm_details "${config_smalltalk}" "Linux" 1)"
set_vars vm_filename vm_path git_tag "${vm_details}"
assert_vm_filename "${vm_filename}" "squeak.cog.v3_linux64x64_"
assertEquals "${config_vm_dir}/sqcoglinuxht/squeak" "${vm_path}"
assert_vm_filename "${vm_filename}" "squeak.cog.spur_linux64x64_"
assertEquals "${config_vm_dir}/sqcogspur64linuxht/squeak" "${vm_path}"
starts_with "${git_tag}" "v2" || fail "Unexpected git_tag: '${git_tag}'"

config_smalltalk="Squeak32-5.2"
Expand Down

0 comments on commit 9b0e05c

Please sign in to comment.