Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
annotate tests/ports.t @ 782:11f3101c1980
farray.sh: Implemented plain Insertionsort.
Using the optimized algorithm already used in Shell sort, just without manx
gaps and using only the fixed last step 1.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sat, 26 Oct 2024 18:35:37 +0200 |
| parents | 56ab5c012d5f |
| children | 1ffb4e15151d |
| rev | line source |
|---|---|
|
770
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
1 Basic tests of ports.subr |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
2 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
3 Shell is /bin/sh |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
4 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
5 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
6 Setup |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
7 ===== |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
8 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
9 We need common.subr and ports.subr |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
10 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
11 $ set -u |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
12 $ . "${TESTDIR}/testsetup.sh" |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
13 $ _p_datadir="${TESTDIR}/../share/local-bsdtools" |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
14 $ . "${_p_datadir}/farray.sh" |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
15 $ . "${_p_datadir}/common.subr" |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
16 $ . "${_p_datadir}/ports.subr" |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
17 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
18 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
19 Package Mapping |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
20 =============== |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
21 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
22 init_package_mapping |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
23 -------------------- |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
24 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
25 $ init_package_mapping PMAPPING |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
26 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
27 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
28 get_package_mapping |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
29 ------------------- |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
30 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
31 An empty database errors fatally |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
32 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
33 $ (get_package_mapping '' whatever-package) |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
34 ERROR: missing falist name or token value |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
35 [70] |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
36 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
37 Empty package name errors fatally |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
38 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
39 $ (get_package_mapping PMAPPING) |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
40 /bin/sh: ERROR: missing package name |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
41 [64] |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
42 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
43 $ get_package_mapping PMAPPING install-package |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
44 parent-package (no-eol) |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
45 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
46 This is the target of the mapping |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
47 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
48 $ get_package_mapping PMAPPING parent-package |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
49 [1] |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
50 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
51 Another package |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
52 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
53 $ get_package_mapping PMAPPING install-package-v2 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
54 parent-package-v2 (no-eol) |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
55 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
56 Commented out |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
57 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
58 $ get_package_mapping PMAPPING install-package-v3 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
59 [1] |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
60 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
61 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
62 Repositories |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
63 ============ |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
64 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
65 Assume that FreeBSD is always configured and enabled |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
66 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
67 $ get_configured_pkg_repository_names | grep -F FreeBSD |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
68 FreeBSD |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
69 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
70 |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
71 # Runtime much too long: need another strategy |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
72 # $ REPODB='' |
|
56ab5c012d5f
fports: Begin a new command "fports" and fully implemented its subcommand "fports deptree".
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
73 # $ init_repositories REPODB |
