Skip to content

Commit

Permalink
Merge pull request #3588 from raspberrypi/e2etest
Browse files Browse the repository at this point in the history
Tests for adoc manipulation and nav generation
  • Loading branch information
Alasdair Allan authored Apr 12, 2024
2 parents edbeb31 + 5b7165f commit 4ef432c
Show file tree
Hide file tree
Showing 23 changed files with 1,303 additions and 4,433 deletions.
54 changes: 54 additions & 0 deletions tests/fixtures/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.

# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: Raspberry Pi Documentation
description: >- # this means to ignore newlines until "baseurl:"
Raspberry Pi Documentation.
baseurl: "/documentation" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
githuburl: "https://github.com/raspberrypi/documentation/"
githubbranch: master
githubbranch_edit: develop

# Build settings
theme: minima
plugins:
- jekyll-asciidoc
- jekyll-feed

# this corresponds to ASCIIDOC_BUILD_DIR in Makefile
source: build/jekyll

# this corresponds to HTML_DIR in Makefile
destination: documentation/html

sass:
sass_dir: css
quiet_deps: true

asciidoctor:
template_dir: build/jekyll/_templates

# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
# to override the default setting.
# exclude:
# - Gemfile
# - Gemfile.lock
# - node_modules
# - vendor/bundle/
# - vendor/cache/
# - vendor/gems/
# - vendor/ruby/
42 changes: 42 additions & 0 deletions tests/fixtures/build_jekyll_data_index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"tabs": [
{
"title": "Microcontrollers",
"path": "/microcontrollers/",
"subitems": [
{
"title": "The C/C++ SDK",
"description": "Getting started with the C/C++ SDK",
"image": "full-sized/C-and-CPP.png",
"subpath": "c_sdk.adoc",
"path": "/microcontrollers/c_sdk.html",
"imagepath": "/images/full-sized/C-and-CPP.png"
},
{
"title": "Product Information Portal",
"description": "Raspberry Pi compliance documents",
"imagepath": "/images/full-sized/PIP.png",
"url": "https://pip.raspberrypi.com/"
},
{
"title": "Datasheets",
"description": "PDF-based documentation",
"imagepath": "/images/full-sized/Datasheets.png",
"url": "https://datasheets.raspberrypi.com"
},
{
"title": "Tutorials",
"description": "Hands-on hardware and software tutorials",
"imagepath": "/images/full-sized/Tutorials.png",
"url": "https://www.raspberrypi.com/tutorials/"
},
{
"title": "Forums",
"description": "User and product support forums",
"imagepath": "/images/full-sized/Forums.png",
"url": "https://forums.raspberrypi.com"
}
]
}
]
}
2 changes: 2 additions & 0 deletions tests/fixtures/github_edit.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[.edit-link]
Edit this {{ github_edit_link }}[on GitHub]
191 changes: 191 additions & 0 deletions tests/fixtures/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
{
"tabs": [
{
"title": "Computers",
"path": "computers",
"default_tab": "yes",
"subitems": [
{
"title": "Getting started",
"description": "How to get started with your Raspberry Pi",
"image": "full-sized/Getting-Started.png",
"subpath": "getting-started.adoc"
},
{
"title": "Raspberry Pi OS",
"description": "The official Raspberry Pi operating system",
"image": "full-sized/Raspberry-Pi-OS.png",
"subpath": "os.adoc"
},
{
"title": "Configuration",
"description": "Configuring your Raspberry Pi's settings",
"image": "full-sized/Configuration.png",
"subpath": "configuration.adoc"
},
{
"title": "The config.txt file",
"description": "Low-level settings control",
"image": "full-sized/The-config-txt-file.png",
"subpath": "config_txt.adoc"
},
{
"title": "Legacy config.txt options",
"description": "Options which may be useful for OSes other than Raspberry Pi OS",
"image": "full-sized/Legacy-config-txt.png",
"subpath": "legacy_config_txt.adoc"
},
{
"title": "The Linux kernel",
"description": "How to configure and build a custom kernel for your Raspberry Pi",
"image": "full-sized/Linux-Kernel.png",
"subpath": "linux_kernel.adoc"
},
{
"title": "Remote access",
"description": "Accessing your Raspberry Pi remotely",
"image": "full-sized/Remote-Access.png",
"subpath": "remote-access.adoc"
},
{
"title": "Camera software",
"description": "Software and libraries for Raspberry Pi camera hardware",
"image": "full-sized/Camera.png",
"subpath": "camera_software.adoc"
},
{
"title": "Raspberry Pi hardware",
"description": "Technical information about Raspberry Pi hardware",
"image": "full-sized/Raspberry-Pi-Hardware.png",
"subpath": "raspberry-pi.adoc"
},
{
"title": "Compute Module hardware",
"description": "Technical information about Raspberry Pi Compute Module hardware",
"image": "full-sized/Compute-Module-Hardware.png",
"subpath": "compute-module.adoc"
},
{
"title": "Processors",
"description": "Technical information about the CPUs used by Raspberry Pi",
"image": "full-sized/Processors.png",
"subpath": "processors.adoc"
}
]
},
{
"title": "Accessories",
"path": "accessories",
"default_tab": "no",
"subitems": [
{
"title": "Camera",
"description": "Raspberry Pi camera boards",
"image": "full-sized/Camera.png",
"subpath": "camera.adoc"
},
{
"title": "Display",
"description": "The Raspberry Pi Touch Display",
"image": "full-sized/Display.png",
"subpath": "display.adoc"
},
{
"title": "Keyboard and mouse",
"description": "Official Raspberry Pi keyboard and mouse",
"image": "full-sized/Keyboard-and-Mouse.png",
"subpath": "keyboard-and-mouse.adoc"
},
{
"title": "Build HAT",
"description": "How to use the Build HAT",
"image": "full-sized/Build-HAT.png",
"subpath": "build-hat.adoc"
},
{
"title": "Sense HAT",
"description": "How to use the Sense HAT",
"image": "full-sized/Sense-HAT.png",
"subpath": "sense-hat.adoc"
},
{
"title": "TV HAT",
"description": "How to watch TV on your Raspberry Pi",
"image": "full-sized/TV-HAT.png",
"subpath": "tv-hat.adoc"
},
{
"title": "Raspberry Pi Audio",
"description": "High-definition audio with Raspberry Pi",
"image": "full-sized/Audio-HATs.png",
"subpath": "audio.adoc"
},
{
"title": "Designing a HAT",
"description": "Information on the HAT specification",
"image": "full-sized/Designing-a-HAT.png",
"url": "https://github.com/raspberrypi/hats"
}
]
},
{
"title": "Microcontrollers",
"path": "microcontrollers",
"subitems": [
{
"title": "RP2040",
"description": "Raspberry Pi's flagship microcontroller device",
"image": "full-sized/RP2040.png",
"subpath": "rp2040.adoc"
},
{
"title": "Raspberry Pi Pico and Pico W",
"description": "Support for Raspberry Pi Pico, Pico H, Pico W, and Pico WH",
"image": "full-sized/Pico.png",
"subpath": "raspberry-pi-pico.adoc"
},
{
"title": "Raspberry Pi Debug Probe",
"description": "Supports Arm Serial Wire Debug (SWD), and acts as a UART bridge",
"image": "full-sized/Debug-Probe.png",
"subpath": "debug-probe.adoc"
},
{
"title": "RP1",
"description": "Our southbridge for Raspberry Pi 5",
"image": "full-sized/RP1.png",
"subpath": "rp1.adoc"
},
{
"title": "MicroPython",
"description": "Getting started with MicroPython",
"image": "full-sized/MP.png",
"subpath": "micropython.adoc"
},
{
"title": "The C/C++ SDK",
"description": "Getting started with the C/C++ SDK",
"image": "full-sized/C-and-CPP.png",
"subpath": "c_sdk.adoc"
}
]
},
{
"title": "Services",
"path": "services",
"subitems": [
{
"title": "Raspberry Pi ID",
"description": "Our identity service",
"image": "full-sized/Raspberry-Pi-ID.png",
"subpath": "id.adoc"
}
]
},
{
"title": "Pico C SDK",
"from_json": "picosdk_index.json",
"directory": "pico-sdk"
}
]
}
7 changes: 7 additions & 0 deletions tests/fixtures/microcontrollers/c_sdk.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include::c_sdk/sdk_setup.adoc[]

include::c_sdk/official_sdk.adoc[]

include::c_sdk/your_first_binary.adoc[]

include::c_sdk/quick_start.adoc[]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions tests/fixtures/microcontrollers/c_sdk/official_sdk.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
== Raspberry Pi Pico C/{cpp} SDK

Our official C SDK can be used from the command line, or from popular integrated development environments like Visual Studio Code, Eclipse, and CLion. To get started, download our C/{cpp} SDK and Examples, and take a look at our 'https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf[getting started]' documentation to get going. Or for a quick setup see the next section.

* The SDK https://github.com/raspberrypi/pico-sdk[Github repository]

* The Examples https://github.com/raspberrypi/pico-examples[Github repository]

You can find documentation around the C/{cpp} SDK at;

https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf[Getting started with Raspberry Pi Pico]:: C/{cpp} development with Raspberry Pi Pico and other RP2040-based microcontroller boards

https://datasheets.raspberrypi.com/picow/connecting-to-the-internet-with-pico-w.pdf[Connecting to the Internet with Raspberry Pi Pico W]:: Getting Raspberry Pi Pico W online with C/{cpp} or MicroPython

https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-c-sdk.pdf[Raspberry Pi Pico C/{cpp} SDK]:: Libraries and tools for C/{cpp} development on RP2040 microcontrollers

xref:../pico-sdk/index_doxygen.adoc[API level documentation]:: Documentation for the Raspberry Pi Pico C/{cpp} SDK

[NOTE]
====
If you are building applications with the C/{cpp} SDK and targeting boards other than the Raspberry Pi Pico, you will need to pass `-DPICO_BOARD=boardname` to CMake. Here `boardname` is the name of your board, e.g. for the Adafruit Feather RP2040 you should pass `-DPICO_BOARD=adafruit_feather_rp2040`. See the https://github.com/raspberrypi/pico-sdk/tree/master/src/boards[`boards/` directory] in the Raspberry Pi Pico SDK, and the https://forums.raspberrypi.com/viewtopic.php?f=147&t=304393[forums], for more information.
====

[NOTE]
====
Documentation introducing working with Wi-Fi and Bluetooth on Raspberry Pi Pico W with C/{cpp} or MicroPython is presented in the https://datasheets.raspberrypi.com/picow/connecting-to-the-internet-with-pico-w.pdf[Connecting to the Internet with Raspberry Pi Pico W] book.
====

[NOTE]
====
If you are building applications with the C/{cpp} SDK for Raspberry Pi Pico W and, to connect to a network you will need to pass `-DPICO_BOARD=pico_w -DWIFI_SSID="Your Network" -DWIFI_PASSWORD="Your Password"` to CMake. If you only need to enable Bluetooth support then you do not need to pass a SSID and password, but still need to pass the `-DPICO_BOARD=pico_w` string to CMake.
====
Loading

0 comments on commit 4ef432c

Please sign in to comment.