summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rwxr-xr-xtesting/gen-languages-all12
-rwxr-xr-xtesting/get-swift.sh6
-rwxr-xr-xtesting/make-archives2
-rw-r--r--testing/resources/dotnet_hooks_combo_repo/.pre-commit-hooks.yaml12
-rw-r--r--testing/resources/dotnet_hooks_combo_repo/dotnet_hooks_combo_repo.sln28
-rw-r--r--testing/resources/dotnet_hooks_combo_repo/proj1/Program.cs12
-rw-r--r--testing/resources/dotnet_hooks_combo_repo/proj1/proj1.csproj12
-rw-r--r--testing/resources/dotnet_hooks_combo_repo/proj2/Program.cs12
-rw-r--r--testing/resources/dotnet_hooks_combo_repo/proj2/proj2.csproj12
-rw-r--r--testing/resources/golang_hooks_repo/go.mod4
-rw-r--r--testing/resources/golang_hooks_repo/go.sum2
11 files changed, 104 insertions, 10 deletions
diff --git a/testing/gen-languages-all b/testing/gen-languages-all
index dfd92c0..05f8929 100755
--- a/testing/gen-languages-all
+++ b/testing/gen-languages-all
@@ -3,15 +3,15 @@ from __future__ import annotations
import sys
-LANGUAGES = [
+LANGUAGES = (
'conda', 'coursier', 'dart', 'docker', 'docker_image', 'dotnet', 'fail',
'golang', 'lua', 'node', 'perl', 'pygrep', 'python', 'r', 'ruby', 'rust',
'script', 'swift', 'system',
-]
-FIELDS = [
- 'ENVIRONMENT_DIR', 'get_default_version', 'healthy', 'install_environment',
- 'run_hook',
-]
+)
+FIELDS = (
+ 'ENVIRONMENT_DIR', 'get_default_version', 'health_check',
+ 'install_environment', 'run_hook',
+)
def main() -> int:
diff --git a/testing/get-swift.sh b/testing/get-swift.sh
index a05b7b9..b77e18c 100755
--- a/testing/get-swift.sh
+++ b/testing/get-swift.sh
@@ -3,9 +3,9 @@
set -euo pipefail
. /etc/lsb-release
-if [ "$DISTRIB_CODENAME" = "bionic" ]; then
- SWIFT_URL='https://swift.org/builds/swift-5.1.3-release/ubuntu1804/swift-5.1.3-RELEASE/swift-5.1.3-RELEASE-ubuntu18.04.tar.gz'
- SWIFT_HASH='ac82ccd773fe3d586fc340814e31e120da1ff695c6a712f6634e9cc720769610'
+if [ "$DISTRIB_CODENAME" = "focal" ]; then
+ SWIFT_URL='https://download.swift.org/swift-5.6.1-release/ubuntu2004/swift-5.6.1-RELEASE/swift-5.6.1-RELEASE-ubuntu20.04.tar.gz'
+ SWIFT_HASH='2b4f22d4a8b59fe8e050f0b7f020f8d8f12553cbda56709b2340a4a3bb90cfea'
else
echo "unknown dist: ${DISTRIB_CODENAME}" 1>&2
exit 1
diff --git a/testing/make-archives b/testing/make-archives
index 1b825fe..04b42dd 100755
--- a/testing/make-archives
+++ b/testing/make-archives
@@ -17,7 +17,7 @@ from typing import Sequence
REPOS = (
('rbenv', 'https://github.com/rbenv/rbenv', '38e1fbb'),
- ('ruby-build', 'https://github.com/rbenv/ruby-build', 'a5ca3e4'),
+ ('ruby-build', 'https://github.com/rbenv/ruby-build', '2004fd7'),
(
'ruby-download',
'https://github.com/garnieretienne/rvm-download',
diff --git a/testing/resources/dotnet_hooks_combo_repo/.pre-commit-hooks.yaml b/testing/resources/dotnet_hooks_combo_repo/.pre-commit-hooks.yaml
new file mode 100644
index 0000000..f221854
--- /dev/null
+++ b/testing/resources/dotnet_hooks_combo_repo/.pre-commit-hooks.yaml
@@ -0,0 +1,12 @@
+- id: dotnet-example-hook
+ name: Test Project 1
+ description: Test Project 1
+ entry: proj1
+ language: dotnet
+ stages: [commit]
+- id: proj2
+ name: Test Project 2
+ description: Test Project 2
+ entry: proj2
+ language: dotnet
+ stages: [commit]
diff --git a/testing/resources/dotnet_hooks_combo_repo/dotnet_hooks_combo_repo.sln b/testing/resources/dotnet_hooks_combo_repo/dotnet_hooks_combo_repo.sln
new file mode 100644
index 0000000..edb0fcb
--- /dev/null
+++ b/testing/resources/dotnet_hooks_combo_repo/dotnet_hooks_combo_repo.sln
@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30114.105
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "proj1", "proj1\proj1.csproj", "{38A939C3-DEA4-47D7-9B75-0418C4249662}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "proj2", "proj2\proj2.csproj", "{4C9916CB-165C-4EF5-8A57-4CB6794C1EBF}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {38A939C3-DEA4-47D7-9B75-0418C4249662}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {38A939C3-DEA4-47D7-9B75-0418C4249662}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {38A939C3-DEA4-47D7-9B75-0418C4249662}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {38A939C3-DEA4-47D7-9B75-0418C4249662}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4C9916CB-165C-4EF5-8A57-4CB6794C1EBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4C9916CB-165C-4EF5-8A57-4CB6794C1EBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4C9916CB-165C-4EF5-8A57-4CB6794C1EBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4C9916CB-165C-4EF5-8A57-4CB6794C1EBF}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/testing/resources/dotnet_hooks_combo_repo/proj1/Program.cs b/testing/resources/dotnet_hooks_combo_repo/proj1/Program.cs
new file mode 100644
index 0000000..03876f5
--- /dev/null
+++ b/testing/resources/dotnet_hooks_combo_repo/proj1/Program.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace proj1
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ Console.Write("Hello from dotnet!\n");
+ }
+ }
+}
diff --git a/testing/resources/dotnet_hooks_combo_repo/proj1/proj1.csproj b/testing/resources/dotnet_hooks_combo_repo/proj1/proj1.csproj
new file mode 100644
index 0000000..4f714d3
--- /dev/null
+++ b/testing/resources/dotnet_hooks_combo_repo/proj1/proj1.csproj
@@ -0,0 +1,12 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>net5.0</TargetFramework>
+
+ <PackAsTool>true</PackAsTool>
+ <ToolCommandName>proj1</ToolCommandName>
+ <PackageOutputPath>./nupkg</PackageOutputPath>
+ </PropertyGroup>
+
+</Project>
diff --git a/testing/resources/dotnet_hooks_combo_repo/proj2/Program.cs b/testing/resources/dotnet_hooks_combo_repo/proj2/Program.cs
new file mode 100644
index 0000000..47a99a3
--- /dev/null
+++ b/testing/resources/dotnet_hooks_combo_repo/proj2/Program.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace proj2
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ Console.WriteLine("Hello World!");
+ }
+ }
+}
diff --git a/testing/resources/dotnet_hooks_combo_repo/proj2/proj2.csproj b/testing/resources/dotnet_hooks_combo_repo/proj2/proj2.csproj
new file mode 100644
index 0000000..da451f7
--- /dev/null
+++ b/testing/resources/dotnet_hooks_combo_repo/proj2/proj2.csproj
@@ -0,0 +1,12 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>net5.0</TargetFramework>
+
+ <PackAsTool>true</PackAsTool>
+ <ToolCommandName>proj2</ToolCommandName>
+ <PackageOutputPath>./nupkg</PackageOutputPath>
+ </PropertyGroup>
+
+</Project>
diff --git a/testing/resources/golang_hooks_repo/go.mod b/testing/resources/golang_hooks_repo/go.mod
index 523bfc9..f37d4b6 100644
--- a/testing/resources/golang_hooks_repo/go.mod
+++ b/testing/resources/golang_hooks_repo/go.mod
@@ -1 +1,5 @@
module golang-hello-world
+
+go 1.18
+
+require github.com/BurntSushi/toml v1.1.0
diff --git a/testing/resources/golang_hooks_repo/go.sum b/testing/resources/golang_hooks_repo/go.sum
new file mode 100644
index 0000000..ec0c385
--- /dev/null
+++ b/testing/resources/golang_hooks_repo/go.sum
@@ -0,0 +1,2 @@
+github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
+github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=