Skip to content

Commit c133169

Browse files
committed
make rustfmt less apologetic
1 parent 6832a4a commit c133169

File tree

1 file changed

+148
-131
lines changed

1 file changed

+148
-131
lines changed

ci/script.sh

Lines changed: 148 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ test_svd() {
44
curl -L \
55
https://raw.githubusercontent.com/posborne/cmsis-svd/python-0.4/data/$VENDOR/${1}.svd \
66
> $td/${1}.svd
7-
target/$TARGET/release/svd2rust -i $td/${1}.svd | rustfmt > $td/src/lib.rs
7+
target/$TARGET/release/svd2rust -i $td/${1}.svd | rustfmt 2>/dev/null > $td/src/lib.rs
88
cargo check --manifest-path $td/Cargo.toml
99
}
1010

@@ -31,8 +31,6 @@ main() {
3131
echo 'cortex-m = "0.2.0"' >> $td/Cargo.toml
3232
echo 'vcell = "0.1.0"' >> $td/Cargo.toml
3333

34-
# TODO remove
35-
set +e
3634
case $VENDOR in
3735
Atmel)
3836
# BAD-SVD missing resetValue
@@ -101,24 +99,29 @@ main() {
10199
# FIXME(???) "failed to resolve. Use of undeclared type or module `sercom0`"
102100
# test_svd ATSAMD21E15A
103101

104-
test_svd ATSAMD21E16A
105-
test_svd ATSAMD21E17A
106-
test_svd ATSAMD21E18A
107-
test_svd ATSAMD21G16A
108-
test_svd ATSAMD21G17A
109-
test_svd ATSAMD21G18A
110-
test_svd ATSAMD21J16A
111-
test_svd ATSAMD21J17A
112-
test_svd ATSAMD21J18A
113-
test_svd ATSAMR21E16A
114-
test_svd ATSAMR21E17A
115-
test_svd ATSAMR21E18A
116-
test_svd ATSAMR21G16A
117-
test_svd ATSAMR21G17A
118-
test_svd ATSAMR21G18A
102+
# FIXME(???) "failed to resolve. Use of undeclared type or module `sercom0`"
103+
# test_svd ATSAMD21E16A
104+
# test_svd ATSAMD21E17A
105+
# test_svd ATSAMD21E18A
106+
# test_svd ATSAMD21G16A
107+
# test_svd ATSAMD21G17A
108+
# test_svd ATSAMD21G18A
109+
# test_svd ATSAMD21J16A
110+
# test_svd ATSAMD21J17A
111+
# test_svd ATSAMD21J18A
112+
# test_svd ATSAMR21E16A
113+
# test_svd ATSAMR21E17A
114+
# test_svd ATSAMR21E18A
115+
# test_svd ATSAMR21G16A
116+
# test_svd ATSAMR21G17A
117+
# test_svd ATSAMR21G18A
119118
;;
120119

121120
Freescale)
121+
# FIXME(#105) "error[E0428]: a type named `NOT_USEDR` has already been defined in this module"
122+
# test_svd MK61F15
123+
# test_svd MK61F15WS
124+
122125
# OK
123126
# test_svd MK02F12810
124127
# test_svd MK10D10
@@ -167,10 +170,12 @@ main() {
167170
# test_svd MK53DZ10
168171
# test_svd MK60D10
169172

173+
# TODO remove
174+
set +e
175+
170176
test_svd MK60DZ10
171177
test_svd MK60F15
172-
test_svd MK61F15
173-
test_svd MK61F15WS
178+
174179
test_svd MK63F12
175180
test_svd MK64F12
176181
test_svd MK65F18
@@ -258,9 +263,11 @@ main() {
258263
test_svd SKEAZ1284
259264
test_svd SKEAZN642
260265
test_svd SKEAZN84
266+
267+
set -e
268+
exit 1
261269
;;
262270

263-
# ALL OK
264271
Fujitsu)
265272
test_svd MB9AF10xN
266273
test_svd MB9AF10xR
@@ -364,7 +371,6 @@ main() {
364371
test_svd S6E2CC
365372
;;
366373

367-
# ALL OK
368374
Holtek)
369375
test_svd ht32f125x
370376
test_svd ht32f175x
@@ -375,7 +381,7 @@ main() {
375381
test_svd nrf51
376382

377383
# BAD-SVD two enumeratedValues have the same value
378-
test_svd nrf52
384+
# test_svd nrf52
379385
;;
380386

381387
Nuvoton)
@@ -388,135 +394,159 @@ main() {
388394
# test_svd LPC1102_4_v4
389395

390396
test_svd LPC11Axxv0
391-
test_svd LPC11Cxx_v9
392-
test_svd LPC11D14_svd_v4
397+
398+
# FIXME(???) "a type named `RESERVED_` has already been defined in this enum"
399+
# test_svd LPC11Cxx_v9
400+
401+
# FIXME(???) "expected one of `(`, `,`, `=`, `{`, or `}`, found `.``)`"
402+
# test_svd LPC11D14_svd_v4
403+
393404
test_svd LPC11E6x_v0
394-
test_svd LPC11Exx_v5
395-
test_svd LPC11Uxx_v7
396-
test_svd LPC11xx_v6a
397-
test_svd LPC11xx_v6
398-
test_svd LPC13Uxx_v1
399-
test_svd LPC13xx_svd_v1
400-
test_svd LPC15xx_v0
401-
test_svd LPC176x5x_v0
402-
test_svd LPC178x_7x
403-
test_svd LPC178x_7x_v0
404-
test_svd LPC18xx_svd_v18
405-
test_svd LPC408x_7x_v0
406-
test_svd LPC43xx_svd_v5
407-
test_svd LPC5410x_v0
408-
test_svd LPC800_v0
405+
406+
# BAD-SVD two enumeratedValues have the same name
407+
# test_svd LPC11Exx_v5
408+
# test_svd LPC11Uxx_v7
409+
# test_svd LPC11xx_v6a
410+
# test_svd LPC11xx_v6
411+
# test_svd LPC13Uxx_v1
412+
# test_svd LPC15xx_v0.7
413+
# test_svd LPC800_v0.3
414+
415+
# FIXME(???) "expected one of `(`, `,`, `=`, `{`, or `}`, found `.``)`"
416+
# test_svd LPC13xx_svd_v1
417+
418+
test_svd LPC176x5x_v0.2
419+
420+
# BAD-SVD missing resetValue
421+
# test_svd LPC178x_7x
422+
# test_svd LPC178x_7x_v0.8
423+
# test_svd LPC408x_7x_v0.7
424+
425+
# FIXME(???) "expected one of `(`, `,`, `=`, `{`, or `}`, found `.``)`"
426+
# test_svd LPC18xx_svd_v18
427+
428+
# FIXME(???) "expected one of `(`, `,`, `=`, `{`, or `}`, found `.``)`"
429+
# test_svd LPC43xx_svd_v5
430+
431+
test_svd LPC5410x_v0.4
409432
;;
410433

411434
SiliconLabs)
412435
# FIXME(#99) "duplicate definitions with name `is_set`"
413436
# test_svd SIM3C1x4_SVD
437+
# test_svd SIM3C1x6_SVD
438+
# test_svd SIM3C1x7_SVD
439+
# test_svd SIM3L1x4_SVD
440+
# test_svd SIM3L1x6_SVD
441+
# test_svd SIM3L1x7_SVD
442+
# test_svd SIM3L1x8_SVD
443+
# test_svd SIM3U1x4_SVD
444+
# test_svd SIM3U1x6_SVD
414445

415-
test_svd SIM3C1x6_SVD
416-
test_svd SIM3C1x7_SVD
417-
test_svd SIM3L1x4_SVD
418-
test_svd SIM3L1x6_SVD
419-
test_svd SIM3L1x7_SVD
420-
test_svd SIM3L1x8_SVD
421-
test_svd SIM3U1x4_SVD
422-
test_svd SIM3U1x6_SVD
423446
test_svd SIM3U1x7_SVD
424447
;;
425448

426449
Spansion)
427450
# FIXME(#102) "binary operation `>>` cannot be applied to type `bool`"
428451
# test_svd MB9AF10xN
452+
# test_svd MB9AF10xR
453+
# test_svd MB9AF11xK
454+
# test_svd MB9AF11xL
455+
# test_svd MB9AF11xM
456+
# test_svd MB9AF11xN
457+
# test_svd MB9AF13xK
458+
# test_svd MB9AF13xL
459+
# test_svd MB9AF13xM
460+
# test_svd MB9AF13xN
461+
# test_svd MB9AF14xL
462+
# test_svd MB9AF14xM
463+
# test_svd MB9AF14xN
464+
# test_svd MB9AF15xM
465+
# test_svd MB9AF15xN
466+
# test_svd MB9AF15xR
467+
# test_svd MB9AF31xK
468+
# test_svd MB9AF31xL
469+
# test_svd MB9AF31xM
470+
# test_svd MB9AF31xN
471+
# test_svd MB9AF34xL
472+
# test_svd MB9AF34xM
473+
# test_svd MB9AF34xN
474+
# test_svd MB9AFA3xL
475+
# test_svd MB9AFA3xM
476+
# test_svd MB9AFA3xN
477+
# test_svd MB9AFA4xL
478+
# test_svd MB9AFA4xM
479+
# test_svd MB9AFA4xN
480+
# test_svd MB9AFB4xL
481+
# test_svd MB9AFB4xM
482+
# test_svd MB9AFB4xN
483+
# test_svd MB9BF10xN
484+
# test_svd MB9BF10xR
485+
# test_svd MB9BF11xN
486+
# test_svd MB9BF11xR
487+
# test_svd MB9BF11xS
488+
# test_svd MB9BF11xT
489+
# test_svd MB9BF12xK
490+
# test_svd MB9BF12xL
491+
# test_svd MB9BF12xM
492+
# test_svd MB9BF21xS
493+
# test_svd MB9BF21xT
494+
# test_svd MB9BF30xN
495+
# test_svd MB9BF30xR
496+
# test_svd MB9BF31xN
497+
# test_svd MB9BF31xR
498+
# test_svd MB9BF31xS
499+
# test_svd MB9BF31xT
500+
# test_svd MB9BF32xK
501+
# test_svd MB9BF32xL
502+
# test_svd MB9BF32xM
503+
# test_svd MB9BF40xN
504+
# test_svd MB9BF40xR
505+
# test_svd MB9BF41xN
506+
# test_svd MB9BF41xR
507+
# test_svd MB9BF41xS
508+
# test_svd MB9BF41xT
509+
# test_svd MB9BF50xN
510+
# test_svd MB9BF50xR
511+
# test_svd MB9BF51xN
512+
# test_svd MB9BF51xR
513+
# test_svd MB9BF51xS
514+
# test_svd MB9BF51xT
515+
# test_svd MB9BF52xK
516+
# test_svd MB9BF52xL
517+
# test_svd MB9BF52xM
518+
# test_svd MB9BF61xS
519+
# test_svd MB9BF61xT
520+
# test_svd MB9BFD1xS
521+
# test_svd MB9BFD1xT
429522

430-
test_svd MB9AF10xR
431-
test_svd MB9AF11xK
432-
test_svd MB9AF11xL
433-
test_svd MB9AF11xM
434-
test_svd MB9AF11xN
435523
test_svd MB9AF12xK
436524
test_svd MB9AF12xL
437-
test_svd MB9AF13xK
438-
test_svd MB9AF13xL
439-
test_svd MB9AF13xM
440-
test_svd MB9AF13xN
441-
test_svd MB9AF14xL
442-
test_svd MB9AF14xM
443-
test_svd MB9AF14xN
444-
test_svd MB9AF15xM
445-
test_svd MB9AF15xN
446-
test_svd MB9AF15xR
447-
test_svd MB9AF31xK
448-
test_svd MB9AF31xL
449-
test_svd MB9AF31xM
450-
test_svd MB9AF31xN
451-
test_svd MB9AF34xL
452-
test_svd MB9AF34xM
453-
test_svd MB9AF34xN
454525
test_svd MB9AF42xK
455526
test_svd MB9AF42xL
456-
test_svd MB9AFA3xL
457-
test_svd MB9AFA3xM
458-
test_svd MB9AFA3xN
459-
test_svd MB9AFA4xL
460-
test_svd MB9AFA4xM
461-
test_svd MB9AFA4xN
462-
test_svd MB9AFB4xL
463-
test_svd MB9AFB4xM
464-
test_svd MB9AFB4xN
465-
test_svd MB9BF10xN
466-
test_svd MB9BF10xR
467-
test_svd MB9BF11xN
468-
test_svd MB9BF11xR
469-
test_svd MB9BF11xS
470-
test_svd MB9BF11xT
471527
test_svd MB9BF12xJ
472-
test_svd MB9BF12xK
473-
test_svd MB9BF12xL
474-
test_svd MB9BF12xM
475528
test_svd MB9BF12xS
476529
test_svd MB9BF12xT
477530
test_svd MB9BF16xx
478-
test_svd MB9BF21xS
479-
test_svd MB9BF21xT
480-
test_svd MB9BF30xN
481-
test_svd MB9BF30xR
482-
test_svd MB9BF31xN
483-
test_svd MB9BF31xR
484-
test_svd MB9BF31xS
485-
test_svd MB9BF31xT
486-
test_svd MB9BF32xK
487-
test_svd MB9BF32xL
488-
test_svd MB9BF32xM
489531
test_svd MB9BF32xS
490532
test_svd MB9BF32xT
491533
test_svd MB9BF36xx
492-
test_svd MB9BF40xN
493-
test_svd MB9BF40xR
494-
test_svd MB9BF41xN
495-
test_svd MB9BF41xR
496-
test_svd MB9BF41xS
497-
test_svd MB9BF41xT
498534
test_svd MB9BF42xS
499535
test_svd MB9BF42xT
500536
test_svd MB9BF46xx
501-
test_svd MB9BF50xN
502-
test_svd MB9BF50xR
503-
test_svd MB9BF51xN
504-
test_svd MB9BF51xR
505-
test_svd MB9BF51xS
506-
test_svd MB9BF51xT
507-
test_svd MB9BF52xK
508-
test_svd MB9BF52xL
509-
test_svd MB9BF52xM
510537
test_svd MB9BF52xS
511538
test_svd MB9BF52xT
512539
test_svd MB9BF56xx
513-
test_svd MB9BF61xS
514-
test_svd MB9BF61xT
515-
test_svd MB9BFD1xS
516-
test_svd MB9BFD1xT
517540
;;
518541

519542
STMicro)
543+
# FIXME(???) "field is never used: `register`"
544+
# test_svd STM32L051x
545+
# test_svd STM32L052x
546+
# test_svd STM32L053x
547+
# test_svd STM32L062x
548+
# test_svd STM32L063x
549+
520550
test_svd STM32F030
521551
test_svd STM32F031x
522552
test_svd STM32F042x
@@ -549,14 +579,6 @@ main() {
549579
test_svd STM32F439x
550580
test_svd STM32F446x
551581
test_svd STM32F46_79x
552-
553-
# FIXME(???) "field is never used: `register`"
554-
# test_svd STM32L051x
555-
556-
test_svd STM32L052x
557-
test_svd STM32L053x
558-
test_svd STM32L062x
559-
test_svd STM32L063x
560582
test_svd STM32L100
561583
test_svd STM32L15xC
562584
test_svd STM32L15xxE
@@ -566,7 +588,6 @@ main() {
566588
test_svd STM32W108
567589
;;
568590

569-
# ALL OK
570591
Toshiba)
571592
test_svd M061
572593
test_svd M365
@@ -578,10 +599,6 @@ main() {
578599
esac
579600

580601
rm -rf $td
581-
582-
# TODO remove
583-
set -e
584-
exit 1
585602
}
586603

587604
if [ -z $TRAVIS_TAG ]; then

0 commit comments

Comments
 (0)